Hi, All, I'm running an analyses testing for linear and quadratic trends of substance use over years by different districts in a dataset (Youth Risk Behavioral Survey-District level). Some districts have missing years in the data (1991-2015). I'm using the contrast: i.year and p.year commands:
e.g. svy:logit everheroin i.year if sitename=="New York City, NY (NYC)", or
contrast p.year if sitename=="New York City, NY (NYC)"
But I keep getting error message: "estimates post: matrix has missing values."
I've tried "force" running (did not allow), constructing my own binary variables for year per each district (same error message).
Any ideas on what I could try next so this syntax runs or another way to test for linear and quadratic trends that isn't using contrast commands. I do not have a background in Stata time series analyses.
Thank you in advance for your time-- very much appreciated!
Julie
e.g. svy:logit everheroin i.year if sitename=="New York City, NY (NYC)", or
contrast p.year if sitename=="New York City, NY (NYC)"
But I keep getting error message: "estimates post: matrix has missing values."
I've tried "force" running (did not allow), constructing my own binary variables for year per each district (same error message).
Any ideas on what I could try next so this syntax runs or another way to test for linear and quadratic trends that isn't using contrast commands. I do not have a background in Stata time series analyses.
Thank you in advance for your time-- very much appreciated!
Julie