Hi,
I am a new STATA user and found this forum has been incredibly helpful for me. I can't seem to find answers to my specific situation so I decide to post this problem and hopefully someone can help me.
I am trying to run logit regressions with mediating variables. I have tried to use GSEM, but the logit regression won't converge. After I went through some of the posts in the forum that recommended relogit and Firthlogit, I decided to run separate regressions, and multiply the coefficient together to get the indirect effect.
Luckily, I have been able to find results using relogit. However, it is hard for me to export the results, as I am running multiple mediating variables with multiple predicting variables. I have created two varlists, one for predicting variables and one for mediating variables. My problem is when I am trying to export my results to excel, it can only append vertically. Is there any way I can append the results horizontally when I am running through my predicting variables list?
My code:
local indivar inshold top1_hold top5_hold mot_hold lt_time_holding lt_turnover_holding ind_holding ind_holding2 tra_holding //predicting variable list
local medvar risk_com duality //mediating variable list
foreach m of local medvar {
foreach x of local indivar{
relogit `m' `x' ta firmage tobin roa sperf sgrowth lev2 srv fci rdass capxass assint f500 hrfd unique ind_tobin total_inshold
eststo a: nlcom (_b[`x']), post
relogit target `m' `x' ta firmage tobin roa sperf sgrowth lev2 srv fci rdass capxass assint f500 hrfd unique ind_tobin total_inshold
eststo b: nlcom(_b[`m']) , post
relogit target `m' `x' ta firmage tobin roa sperf sgrowth lev2 srv fci rdass capxass assint f500 hrfd unique ind_tobin total_inshold
eststo c: nlcom (_b[`x']), post
esttab a b c using test_gsem.csv, starlevels(* 0.10 ** 0.05 *** 0.01) append
}
esttab a b c using test_gsem.csv, starlevels(* 0.10 ** 0.05 *** 0.01) append
}
Thank you so much.
Related Posts with Append regression results horizontally
Data Management - Rate & Proportion & PercentHi, I have a data management question. I have a dataset where the unit of analysis is districts. I …
Color palette installation on stata Hello everyone, These are some color palettes I can use for making beamer slides and after searchin…
Entrophy balance matching-make sure that treated and controls come from different industriesDear All, I have a question on entrophy balancing matching and would be really grateful if there ar…
How to impute this missing variable?Dear Statalist, I would like to ask some advice about how to impute correctly the end date of a cont…
[Help] Conditional logit -cmclogit-: marginal effect vs change in predicted probabilities, no matchDear Statalist, Currently using the -cmclogit- command. I've been estimating marginal effects (dydx…
Subscribe to:
Post Comments (Atom)
0 Response to Append regression results horizontally
Post a Comment