Announcement

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

  • error: r198 - you must use either the timevar() or centile(option).

    Hello all,

    I am replicating Paul Dickman's do file


    Code:
     // age-standardised 5-year survival for males, females, and the difference between the two // the standard population is the age distribution of all patients across all years
    
    generate t10=10 in 1
    forvalues y = 2003/2020 {  
    display "Calculating age-standardised survival for year: `y' "  
    rcsgen, scalar(`y') knots(${yearknots}) rmatrix(R) gen(c) 
    standsurv , at1(male 0 maleyr1 0 maleyr2 0 maleyr3 0 yearspl1 `=c1' yearspl2 `=c2' yearspl3 `=c3') ///
    at2(male 1 maleyr1 `=c1' maleyr2 `=c2' maleyr3 `=c3' yearspl1 `=c1' yearspl2 `=c2' yearspl3 `=c3') ///              
    timevar(t10) contrast(difference) ci ///              
    atvar(S_female`y' S_male`y') contrastvars(S_diff`y')
    }  
    
    
    list *1975* in 1
    I get the following error:

    "you must use either the timevar() or centile() option (or the attime(var) suboption of the (at) option.)
    r198

    I don't undrestand what this means, or what I'm doing wrong
    I literally replciated the code of Paul dickman but instead change the years and instead changed t10=10 in 1

    Let me know if you can see anything I;m doing wrong
    as i can;t see anything wrong - but perhaps I'm naive !
    Last edited by Martin Imelda Borg; 20 Nov 2023, 09:20. Reason: formatting

  • #2
    i've put everything in one line and this error went away instead i got another -_-'
    https://www.statalist.org/forums/for...robably-exists

    Comment

    Working...
    X