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
What difference doe a dummy variable make to regression output:Say I wanted to measure the impact of government intervention and I had a data set that looked like …
Plotting difference between MarginsDear Statafriends I constracted some marginal plots, and now, I would like to plot the difference b…
Calculating sex ratioDear All, It must be something simple but I couldn't find any help on web. I wanted to know whether…
Selecting a peer group for comparisonDear all, I have a question that I think should be pretty straightforward for some of the power use…
Merging panel data and time series with different time formatsHey, I have the following problem; I have 2 datasets; a panel dataset where the time variable is a …
Subscribe to:
Post Comments (Atom)
0 Response to Exporting Variables to Excel
Post a Comment