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
using collect to place frequency distributions from two variables next to each otherDear Stata Forum, I would like to use the collect command to make a table that has two frequency di…
Working with datesHello, I am attempting to turn a string value "2020-2021" into a date value. Nothing I am doing is a…
Stock variable problemDear Statalist, I am trying to address the perpetual method in order to build a stock variable. Basi…
Panel data OLS time and ID restrictions.Hello I want to make an OLS regression in Stata my regression will be Code: regress regress inte…
Heteroskedasticity - Breusch–Pagan testDear Stata community! I am running the three Breusch–Pagan tests versions most common in Stata (es…
Subscribe to:
Post Comments (Atom)
0 Response to Exporting Variables to Excel
Post a Comment