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
Panel data difference-in-difference with different treatment timingHi all, I'm trying to study whether the decline in birth rates had an impact on GDP on a national l…
save results from "test" (wald test) command and combine later with others to create outputI am running several test commands in a row and I would like to save these results and combine them …
Combining two datasets on two variables.Hello, I have one dataset (called Natural Disaster) with three variables: Year, CountryCode, and Tot…
Merging problemHi statalist, I have shown a sample of my dataset below. I want to make a merging with the other da…
return first non-zero valueDear All, Suppose that I have this dataset Code: clear input id x 1 . 1 0 1 3 1 4 2 0 2 . 2 0 2 3 …
Subscribe to:
Post Comments (Atom)
0 Response to Exporting Variables to Excel
Post a Comment