Hi all,
I have a count data on monthly number of reported cases of a disease for 3 years (36 months) and monthly reported cases of another disease for 3 years (24 months with "0" cases, and last 12 months with # of cases). Since, it is count data which is over dispersed, i am using Negative Binomial Regression in STATA. I want to see how predictor disease cases are influencing the outcome disease cases. The problem is that the outcome disease (36 months) is a seasonal disease whereby within a year, it follows a seasonal pattern (higher in winter months, lower in summer months). Now my model is as follows:
nbreg outcome predictor if province==1, irr
I want to include the seasonality in this model. I have a variable namely "month" which is 1, 2, 3, 4, .... 12 as per calendar month. So all 36 observations have either 1 of these 12 months, (each month is repeated 3 times). What is the best way to incorporate/adjust seasonality in above model. One option (perhaps that may be oversimplification) is as follows:
nbreg outcome predictor i.month if province==1, irr
But I am aware that this may not solve the purpose. I have heard about sin and cosine functions addition into the model, but i have not been able to figure out how to do that in STATA. I will greatly appreciate if someone can please help me out by guiding on the best way out to adjust for seasonality, and step by step process for the same, e.g. sin cosine function addition in this model.
Also, running margins command after the above model, yield an error "factor predictor not found in list of covariates"
Thanks,
I have a count data on monthly number of reported cases of a disease for 3 years (36 months) and monthly reported cases of another disease for 3 years (24 months with "0" cases, and last 12 months with # of cases). Since, it is count data which is over dispersed, i am using Negative Binomial Regression in STATA. I want to see how predictor disease cases are influencing the outcome disease cases. The problem is that the outcome disease (36 months) is a seasonal disease whereby within a year, it follows a seasonal pattern (higher in winter months, lower in summer months). Now my model is as follows:
nbreg outcome predictor if province==1, irr
I want to include the seasonality in this model. I have a variable namely "month" which is 1, 2, 3, 4, .... 12 as per calendar month. So all 36 observations have either 1 of these 12 months, (each month is repeated 3 times). What is the best way to incorporate/adjust seasonality in above model. One option (perhaps that may be oversimplification) is as follows:
nbreg outcome predictor i.month if province==1, irr
But I am aware that this may not solve the purpose. I have heard about sin and cosine functions addition into the model, but i have not been able to figure out how to do that in STATA. I will greatly appreciate if someone can please help me out by guiding on the best way out to adjust for seasonality, and step by step process for the same, e.g. sin cosine function addition in this model.
Also, running margins command after the above model, yield an error "factor predictor not found in list of covariates"
Thanks,
Comment