Hello,
I am fairly new to Stata.
I need to run a cox regression over 248 variables and I want to then output HR and p-value. I have done a simple loop and got the results.
I got a table shown in the pic below for 248 variables and I tried to put results (table) in the excel but it didn't work.

stset Day_death, failure(Con_OS)
forvalue i = 1/248 {
stcox v`i'
putexcel (A`i') = matrix (r(table)), names
}
Any help would be appreciated.
I am fairly new to Stata.
I need to run a cox regression over 248 variables and I want to then output HR and p-value. I have done a simple loop and got the results.
I got a table shown in the pic below for 248 variables and I tried to put results (table) in the excel but it didn't work.
stset Day_death, failure(Con_OS)
forvalue i = 1/248 {
stcox v`i'
putexcel (A`i') = matrix (r(table)), names
}
Any help would be appreciated.
Comment