Which methodology to follow, and which statistical analysis to adopt if you have tow variables, one is independent, and the other is dependent, with mediator variable?
You can follow the steps described in Hayes' papers.
Today is prefered to say "direct\indirect effect" instead of "mediation" but it is still common.
For example, Hayes, A. F., & Preacher, K. J. (2014). Statistical mediation analysis with a multicategorical independent variable. British Journal of Mathematical and Statistical Psychology, 67, 451-470.
More details are available in his webpage at https://www.processmacro.org/papers.html.
The type of statistical analysis is determined by the type of independent and dependent variables. If both are measurable or otherwise. Linear regression is usually appropriate for the measured variables, while multiple logarithmic regression is the most appropriate for the categorical variables.
You can follow the steps described in Hayes' papers.
Today is prefered to say "direct\indirect effect" instead of "mediation" but it is still common.
For example, Hayes, A. F., & Preacher, K. J. (2014). Statistical mediation analysis with a multicategorical independent variable. British Journal of Mathematical and Statistical Psychology, 67, 451-470.
More details are available in his webpage at https://www.processmacro.org/papers.html.
I believe the testing method you use would correspond to your research question. In other words, the questioned issue you're examining would influence the method you use.
Variable (number of variables under study and their measurement) along with your objective of study determines the suitable technique that can be applied.
"If you have two variables, one is independent, the other is dependent, with mediator variable? Which methodology to follow?"
Methodology depends on the research questions. For example, if is a "How" question, I think you can adopt multiple regression analysis, however, if it's a "What " question you can apply factor analysis. They're question where you want to find a relationship between two variables and you have to apply partial correlation.
I'd suggest taking a look at Hayes' book Introduction to Mediation, Moderation, and Conditional Process Analysis (2018, The Guilford Press). Hayes' PROCESS Macro v. 3.3 can be downloaded (free) for SPSS or SAS. I use PROCESS to test for mediation using the SPSS Regression function (bootstrapping is available and recommended). Iris mentioned Hayes in the previous response. Good luck with your research...Nick
PS. The appendices of Hayes' book show the different models that you can use. Model 4 seems to fit the situation that you describe.