model comparison of two fixed effects in interaction

63 views
Skip to first unread message

antoine perrier

unread,
Aug 15, 2019, 3:56:34 AM8/15/19
to Aster Analysis User Group
Hello everyone


I have recently gotten my hands on using Aster for my analysis, and I have encountered an issue that I haven't been able to solve until now:

I'm currently running a reaster model, where I test two fixed effect, one categorical (with two categories, lets call them a and b), and one continuous.

model = reaster(resp ~ varb + Categorical* Continuous + (random effects), pred, fam, varb, id, root, data = data_redata)


From what I understood following "The Aster Package Tutorial", I tried to compare the full model with a likelihood ratio test, to following reduced models :

model.cat   = reaster(resp ~ varb + Categorical * Continuous - Categorical + (random effects), pred, fam, varb, id, root, data = data_redata)
model.cont = reaster(resp ~ varb + Categorical * Continuous - Continuous + (random effects), pred, fam, varb, id, root, data = data_redata)
model.int    = reaster(resp ~ varb + Categorical + Continuous + (random effects), pred, fam, varb, id, root, data = data_redata)


the issue I have is that for the model.cont, I have the same degrees of freedom as the full model, which makes the anova comparison not meaningful (p value of 0)
when looking at the summary of both model, while the full model will show the summary statistics for Categorical.b , Continuous and Categorical.b : Continuous , 
the reduced model shows the summary statistics for Categorical.b , Categorical. a : Continuous , and Categorical.b : Continuous 

Is there a way to make the reduced model test only for Categorical.b : Continuous ?
Also, is it correct to test each fixed effect like this?

Best
Antoine



geyer

unread,
Aug 15, 2019, 2:15:10 PM8/15/19
to Aster Analysis User Group
I am not sure what you are asking.  If you want to test for one specific regression coefficient being different from zero, then the p-value printed by the summary command does that.
For example, if you run the example in the help for R function reaster, then the line

    fit:SiteRiverside:RegionS    0.49930    0.01211   41.223   <2e-16 ***

says that the regression coefficient for this term is highly statistically significant.  As to whether you should be doing this, it depends on what else you are doing.  Using all the p-values printed
by R function summary in a maximally stupid way -- keeping all the coefficients with P < 0.05 and throwing out the rest of the terms -- has no justification.  It is not a method of model selection recommended by anyone ever!  In general when you do multiple tests you need to think about correction for multiple testing.  Tests of model comparison are better done using R function anova
as you are doing.

You seem to have found that different R formulas can specify the same model.  This is just a fact of life.  You see what model the formula specifies by looking at the names of the coefficients and how many there are of them.  It may also be helpful to look at the component "dropped' of the output.  This shows terms that R would want to put in but cause collinearity (so are dropped).

Also do you know about "no naked predictors" Aster models course slides, deck 1, slides 55 through 71?  Maybe you do and your question is just too sketchy to exhibit that.  But if not, think about that.

antoine perrier

unread,
Aug 15, 2019, 3:36:34 PM8/15/19
to Aster Analysis User Group
Hello, 

Thank you very much for the quick answer

I am indeed using the anova.asterOrReaster function to do model comparison for both fixed effects and their interaction.
the three formulas I wrote in the original message were actually the formulas for the three reduced models, in which I drop the fixed effects or their interaction,
I then want to individually compare each of these reduced models with the full model. 
 
I also didn't know about the "no naked preditors", thanks for pointing that out. I had a quick look into it, but it didn't solve my problem. 

My question was more related to how the model chooses which component to drop (because of collinearity, as you mentionned):
When I am printing the summary for the full model, it shows that it drops one of the components of the categorical fixed effect. It also shows the coefficient for the interaction between both fixed effect, but only for one the same component of the categorical effect (not mentioned in the "dropped" section of the output).

However, in the reduced model where i drop the continuous variable (model.cont in my original message), when I'm printing the summary, it shows me two distinct coefficients for the interaction between both fixed effect, corresponding to both components of the categorical effect, instead of showing it only for one of the components. 

the problem is also that I end up with the same degrees of freedom than the full model, which makes the model comparison not possible. 

If i fit my models similarly using a mixed effect model (with lmer) , the summaries of both full and reduced models have the same "issues" as the ones i get from my aster models.. However, in that case, I analyse the model directly with the Anova function of the car  package.

so my question would be how could I work around this issue with my aster models, to perform my model comparison with the reduced model dropping the continuous variable?



I hope to have been able to clarify my questions,
best ,

Antoine Perrier 


Reply all
Reply to author
Forward
0 new messages