Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exporting split population survival analysis results into exel

    I want to export my spsurv analysis result to Excel format. I use different models according to the main independent variable used (in this case, the price of cigarettes by type). The following is the code that I use and the resulting Excel output.

    Code:
    foreach y in kretek fkretek white {
    spsurv smoke_t avgprice_`y'_1000 $cov , id(id) seq(t) eform difficult trace iterate(30) cpr0(4)
    outreg2 using "$table/prelim/2019_spsurv_cig_`y'.xls", eform adds(Pr(never fail), e(curep)) replace nose
    }


    Output:
    Click image for larger version

Name:	Output .png
Views:	2
Size:	26.0 KB
ID:	1712624




    I want to know what code I should change if I want to omit column C and move the cure probability coefficient to cell B13 (under the constant coeff.) as shown in the image below.
    Click image for larger version

Name:	Output 2.png
Views:	1
Size:	26.6 KB
ID:	1712625



    Thank you!
    Attached Files
    Access Google Drive with a Google account (for personal use) or Google Workspace account (for business use).
    Last edited by Fariza Zahra Kamilah; 07 May 2023, 21:45.

  • #2
    spsurv is from SSC (FAQ Advice #12). Please provide a data example using the dataex command. See the referenced FAQ Advice for details.

    Comment

    Working...
    X