Hi! I have created a few variables that I'd like to export to an excel file. I have variables rf1 through rf4 and fs and we1 through we4 . How do I create a table where my values are reported in rows so that the row reads Variable Name rf1 ---> fs ---> we1 and the row below is the next variable name ---> rf2 ---> fs ---> we2 .... and so on? My code so far is below (I'm saving the coefficients on variables from my regressions):
regress workedm multi2nd, robust
gen rf1=_b[multi2nd]
regress hourswm multi2nd, robust
gen rf2=_b[multi2nd]
regress incomem multi2nd, robust
gen rf3=_b[multi2nd]
regress weeksm1 multi2nd, robust
gen rf4=_b[multi2nd]
*first stage
regress morekids multi2nd, robust
gen fs=_b[multi2nd]
display fs
gen we1=(rf1)/(fs)
gen we2=(rf2)/(fs)
gen we3=(rf3)/(fs)
gen we4=(rf4)/(fs)
display we1
display we2
display we3
display we4
Related Posts with Exporting Variables to Excel
testing the validy of the instrument in xtivregHi, I am using xtivreg , where xtivreg y (x=z) The issue is that how can i tell that the instrume…
how to know whether a placebo test is passedHello! I'm conducting a placebo test on a staggered DID, I randomly assign treatment firms and poli…
Something wrong with -colorpalette-Dear Stata users, I have installed the -colorpalette- wrote by Ben Jann, and I remenber that it run…
Avergaing values of variables to reduce survey observationsHi, I am looking for a solution to average the survey respones. Below S007 is suvey respondent ID, …
Stata for loop errorHi, I am trying to run the below loop in stata. But i get an error. Can someone help me. I am a be…
Subscribe to:
Post Comments (Atom)
0 Response to Exporting Variables to Excel
Post a Comment