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
Replace value while keeping original labelHi everyone, I would like to replace the value of X1 (SN1) by X2 (SN2) while keeping the original v…
XTSCC for Random EffectCan I use xtscc command to treat hetero and autocorrelation in RE model? and what command can I use …
How to count "at least one"Hello, I apologise for what I'm sure is a trivial question but I've been searching through the foru…
Convert data from wide to longHi, My original data is as follows. The first 2 letters in each columns are variable name and year …
local with semi-colon using #delimitHello, I am cleaning a large dataset & now need to make some manual changes to a string variabl…
Subscribe to:
Post Comments (Atom)
0 Response to Append regression results horizontally
Post a Comment