I have a clinic dataset with count data collected on a monthly basis from January 2013 - May 2018. There are 20+ variables. Almost all of them are "number of patients who accepted xyz treatment" in [month, year]. I have 600+ observations for the count variables and for all of them, the variance is much higher than the mean. Some of my variables are zero-inflated. Counts range from about 10/month - 1500/month.

I want to look at the number of clients who accepted xyz treatment by month from 2013 - 2018. I will do this individually for each treatment of interest. I want to test for 1) presence of trend, 2) direction of trend, and 3) magnitude of trend for all of my count variables.

I have access to Stata. What test should I use? I know how to run a poisson regression and negative binomial with count outcomes and categorical variables, but here I'm not using categorical variables so I don't know what to do. As you can probably tell, I'm a relative newbie so simple explanations are appreciated.

  • $\begingroup$ Look at stats.stackexchange.com/questions/321352/… you can include time with a spline term, or use a gam model (generalized additive model) $\endgroup$ – kjetil b halvorsen Jun 21 '18 at 10:46
  • $\begingroup$ Hi, thank you. I've never used R so I'm having trouble understanding your response to the linked question. I see that you're running a poisson GLM and getting individual means for each of your time points (days), but I'm not sure how I'd be able to apply this in a way that allows me to test for trend. $\endgroup$ – user212307 Jun 21 '18 at 10:57
  • $\begingroup$ I'm looking for a way to get results similar to what I would get if I ran a Cochran Armitage or Somers' D trend test $\endgroup$ – user212307 Jun 21 '18 at 10:58
  • $\begingroup$ You can include time with a spline, and test if the spline term is significant. In that case there is a trend. If you can post or link some of your data, we can try some examples. $\endgroup$ – kjetil b halvorsen Jun 21 '18 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.