Dear Stata experts:
I'm attempting to assess additive interaction between age and another exposure in a dataset from a large-scale cohort study. The code I have written is based on sample Stata code given in this article by VanderWeele and Knol (2014): A Tutorial on Interaction (degruyter.com)
Following the example given in the article, I first created a term for interaction between age and another exposure, then ran a logistic regression model.
I then entered the code, based upon the sample code of VanderWeele and Knol:
Stata returns:
unknown function ()
r(133);
My collaborators and I have been unable to determine why Stata is returning this error message, although we wonder if it may be due to a change in the Stata command structure between the time the attached article was published and the current version of Stata. Can anyone advise me?
I'm attempting to assess additive interaction between age and another exposure in a dataset from a large-scale cohort study. The code I have written is based on sample Stata code given in this article by VanderWeele and Knol (2014): A Tutorial on Interaction (degruyter.com)
Following the example given in the article, I first created a term for interaction between age and another exposure, then ran a logistic regression model.
Code:
gen agexother=age*other
Code:
logit outcome age other agexother cov1 cov2 . . . covN
Code:
nlcom exp(_b[age]+_b[other]+_b[agexother])–exp(_b[ag0])–exp(_b[other])+1
unknown function ()
r(133);
My collaborators and I have been unable to determine why Stata is returning this error message, although we wonder if it may be due to a change in the Stata command structure between the time the attached article was published and the current version of Stata. Can anyone advise me?
Comment