Dear Statalist members,
I am trying to run mediation analysis for my dissertation research using Stata 15/IC on Windows 7. I need to install `sgmediation` to perform Sobel-Goodman mediation tests.
I tried:
ssc install sgmediation
But I got the following error:
"connection timed out" / "package not found"
I also tried:
net from http://fmwww.bc.edu/RePEc/bocode/s/
net install sgmediation
Still the same issue.
My internet connection is working fine. I can browse websites without problems.
What I need:
- I want to test whether Tax Reform (TREF) mediates the relationship between Leverage, Profitability, and Liquidity on Corporate Tax Planning (CETR).
- I have 120 observations (12 firms × 10 years).
When I tried SEM as an alternative:
sem (CETR <- Leverage TREF) (TREF <- Leverage)
Stata gave this error:
"model not identified; no paths from latent variable CETR to observed variables" r(503)
I typed "estat teftects" (which was a typo) and got "r(321)" error. I now know it should be "estat teffects".
My questions:
1. How can I successfully install sgmediation?
2. If sgmediation cannot be installed, how do I correctly specify the SEM model for mediation?
3. Is there an alternative way to test mediation without sgmediation?
What I have tried:
- ssc install sgmediation
- ssc install sgmediation, replace
- net from http://fmwww.bc.edu/RePEc/bocode/s/
- net install sgmediation
- Checking Stata's ado path
Any advice would be greatly appreciated.
Thank you,
Hudu Zayyanu Ahmed
Stata 15/IC, Windows 7
I am trying to run mediation analysis for my dissertation research using Stata 15/IC on Windows 7. I need to install `sgmediation` to perform Sobel-Goodman mediation tests.
I tried:
ssc install sgmediation
But I got the following error:
"connection timed out" / "package not found"
I also tried:
net from http://fmwww.bc.edu/RePEc/bocode/s/
net install sgmediation
Still the same issue.
My internet connection is working fine. I can browse websites without problems.
What I need:
- I want to test whether Tax Reform (TREF) mediates the relationship between Leverage, Profitability, and Liquidity on Corporate Tax Planning (CETR).
- I have 120 observations (12 firms × 10 years).
When I tried SEM as an alternative:
sem (CETR <- Leverage TREF) (TREF <- Leverage)
Stata gave this error:
"model not identified; no paths from latent variable CETR to observed variables" r(503)
I typed "estat teftects" (which was a typo) and got "r(321)" error. I now know it should be "estat teffects".
My questions:
1. How can I successfully install sgmediation?
2. If sgmediation cannot be installed, how do I correctly specify the SEM model for mediation?
3. Is there an alternative way to test mediation without sgmediation?
What I have tried:
- ssc install sgmediation
- ssc install sgmediation, replace
- net from http://fmwww.bc.edu/RePEc/bocode/s/
- net install sgmediation
- Checking Stata's ado path
Any advice would be greatly appreciated.
Thank you,
Hudu Zayyanu Ahmed
Stata 15/IC, Windows 7

Comment