[R-sig-ME] Testing a trend across possibly non-independent estimates, take 2

Steven Orzack orzack at freshpond.org
Fri Sep 18 17:33:45 CEST 2015


I have longitudinal data on Health (0/1) for a set of individuals, each 
of which has a cohort ID (defined by birth year). Each individual is 
assessed for health for a range of ages. Call the data frame 
longitudinal.df, which looks like

ID Age Cohort Health

individual_ID_1 age cohort health_at_age
individual_ID_1 age+1 cohort health_at_age+1
individual_ID_2 age cohort health_at_age
individual_ID_2 age+1 cohort health_at_age+1
etc.

if we fit, say,

glmer(Health ~ Cohort:as.factor(Age) + (Cohort|ID), data = 
longitudinal.df, family = binomial)

we get a set of age-specific slopes:

Cohort:as.factor(Age)64
Cohort:as.factor(Age)66
.
.
.
Cohort:as.factor(Age)92
Cohort:as.factor(Age)94

each estimates the slope on the logit scale of the regression between 
health (y) and cohort (x) for a given age.

This model has a much lower AIC than the model without age-specific 
slopes. This means that there is support for the claim that there is 
heterogeneity across ages with respect to slope.

I have an external hypothesis that the trend of these age-specific 
slopes over age is increasing (with younger ages having negative slopes 
and older ages having positive slopes).


How do I correctly test for an increasing trend over ages of the 
age-specific regression slope estimates derived from the glmer model fit?

many thanks!
-- 
Steven Orzack



More information about the R-sig-mixed-models mailing list