Hello all,
I am replicating Paul Dickman's do file
I get the following error:
error: r198 - atvar() option should either give 2 new variable names or use the stub* option. the specified variable(s) probably exists
I don't undrestand what this means, or what I'm doing wrong
I literally replciated the code of Paul dickman
I don't have any variables by the name S_male or S_female
I've just got variable male = 1 (where male =1 and male = 0 is female)
Let me know if you can see anything I;m doing wrong
as i can;t see anything wrong - but perhaps I'm naive !
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
error: r198 - atvar() option should either give 2 new variable names or use the stub* option. the specified variable(s) probably exists
I don't undrestand what this means, or what I'm doing wrong
I literally replciated the code of Paul dickman
I don't have any variables by the name S_male or S_female
I've just got variable male = 1 (where male =1 and male = 0 is female)
Let me know if you can see anything I;m doing wrong
as i can;t see anything wrong - but perhaps I'm naive !