[R-sig-ME] comparing 2 models

Jonathan Judge bachlaw01 at outlook.com
Wed Apr 25 13:47:33 CEST 2018


I think the best option would be to refit these models in Stan (a front end like rstanarm or brms makes it easy with similar lme4 syntax) and use the LOO function to compare their out of sample predictive power. 

Otherwise, if you wish to stick with lme4, you need some way to properly count the number of effective parameters. AIC doesn’t do that because it doesn’t understand / account for the shrinkage of random effects. You might consider WAIC, which does a better job of this. There is an implementation for lme4 models in the blmeco package. 

Jonathan

Sent from my iPhone

> On Apr 25, 2018, at 2:45 AM, Emmanuel Curis <emmanuel.curis at parisdescartes.fr> wrote:
> 
> Hello,
> 
> I think if your interest is more in predictive power of your model
> than in its ability to reproduce the dataset, your best choice would
> be using cross-validation.  And to summarize the closeness of your
> predicted results to the real ones, you may use all the concordance
> tools, either descriptive like Bland-Altman plots, or more
> quantititive like concordance correlation coefficients (but beware
> that their interpretation beyond « the closest to one, the better » is
> not easy) or similar agreement measures. Obviously, the second part
> can be done without the cross-validation step, on your single, whole
> dataset.
> 
> The « best » model will be the one witht the highest concordance
> correlation coefficient; to test that it is significantly better is
> more tricky, but should be done with carefully crafted simulations,
> fitting one model to simulated data generated by either one model or
> the other and vice-versa...
> 
> Note also that if all your predictors are continuous, as seems to be
> in your description, the syntax (x+y+...)^n is misleading, because it
> forgets some important terms.
> 
> Indeed, let consider the two-variables case, x and y. The first order
> model is z = µ0 + alpha * x + beta * y, a plane. The second order
> model would then be a paraboloid,
> 
> z = µ0 + alpha * x + beta * y + gamma * x² + delta * y² + a * x * y
> 
> However, the syntax (x+y)^2 expends to x + y + x:y, that is it forgets
> the I(x^2) and I(y^2) terms. So, unless you have strong belief that
> both gamma and delta are 0, you're model is incomplete.
> 
> Hope all of this will help,
> Best regards,
> Emmanuel
> 
> On Tue, Apr 24, 2018 at 09:17:32PM -0400, P Greenwood wrote:
> « Hello
> « 
> « Although alpha-band EEG is something of a gold standard in predicting processing of stimuli (pre-stimulus alpha), it is not easy to measure EEG outside the lab (e.g. in a vehicle).  In contrast, heart-rate and eye gaze are more reliably obtained in the field using low-cost wearable sensors. 
> « 
> « We sought to compare the ability of 3 sensors to model human reaction time (RT) to a signal from automation.  We compared these measures: alpha-band (PzAlpha), heart-rate variability (HRV), and eye gaze (lnX).  Each person has 10 trials in each of 5 drives. Pnum is subject number.
> « 
> « We sought to model RT from  alpha-band,  heart-rate variability (HRV), and eye gaze (lnX) and Drive.
> « 
> « sumModelInteraction4 <- lmer(RT ~ 1 + (PzAlpha+ HRV+lnX+Drive)^3 +  (1 | Pnum) + (1 | Trial), data = INFAST_Behavioralnew, REML = FALSE)
> « 
> « The output, pasted below, reveals interactions: PzAlpha x HRV, PzAlpha x Drive, and HRV x Drive. Also pasted below is some of the raw data.
> « 
> « An LRT comparing this model with an additive model (PzAlpha+RMSSD+lnX+Drive+Trial) yields a significant difference.  This suggests that the interactions  PzAlpha x Drive and HRV x Drive are meaningful predictors. 
> « 
> « We would like to determine whether PzAlpha x Drive or  HRV x Drive is the better predictor of RT.  What is the best way to compare those 2 models?  The measures are scaled and centered.
> « 
> « Thank you very much.
> « 
> « Pam Greenwood
> « 
> « Fixed effects:
> «                       Estimate Std. Error         df t value Pr(>|t|)   
> « (Intercept)         -1.908e-01  1.368e-01  3.310e+01  -1.395  0.17235   
> « PzAlpha             -1.098e-01  6.042e-02  2.339e+02  -1.818  0.07041 . 
> « HRV               -1.127e-01  6.402e-02  1.112e+03  -1.760  0.07868 . 
> « lnX                  7.921e-02  7.547e-02  1.102e+03   1.050  0.29416   
> « Drive                5.382e-02  1.661e-02  1.080e+03   3.241  0.00123 **
> « PzAlpha: HRV       -1.586e-01  6.424e-02  7.035e+02  -2.468  0.01382 * 
> « PzAlpha:lnX          1.116e-01  7.400e-02  8.456e+02   1.508  0.13199   
> « PzAlpha:Drive        4.405e-02  1.730e-02  1.049e+03   2.546  0.01103 * 
> « HRV:lnX           -4.723e-02  6.905e-02  1.100e+03  -0.684  0.49407   
> « HRV:Drive          3.652e-02  1.747e-02  1.098e+03   2.091  0.03677 * 
> « lnX:Drive           -1.275e-02  1.992e-02  1.100e+03  -0.640  0.52217   
> « PzAlpha: HRV:lnX    1.473e-02  2.567e-02  8.244e+02   0.574  0.56621   
> « PzAlpha: HRV:Drive  3.308e-02  1.878e-02  1.084e+03   1.761  0.07845 . 
> « PzAlpha:lnX:Drive   -2.325e-02  2.005e-02  9.166e+02  -1.160  0.24640   
> « HRV:lnX:Drive      9.729e-03  1.769e-02  1.097e+03   0.550  0.58247   
> « 
> « 
> «    
> «    Pnum
> «    Drive        Trial    RT    ACC    FzAlpha    CzAlpha    PzAlpha    FzTheta    CzTheta    PzTheta    MeanPupil    lnX    lnY    MeanRR    
> « HRV
> « 20    1    1    1480.8931    1    7.9928    10.216    7.6254    3.4916    4.8657    6.4977    4.280969072    -3.208115816    -2.423813328    0.7336          0.074666667
> « 20    1    2    1983.254    1    -8.2609    0.62018    0.32812    4.2257    6.0181    6.5564    4.360414101    -1.926558582    -2.364252526    0.7336        0.074666667
> « 20    1    3    1588.0317    1    1.2572    5.5394    9.0619    4.322    6.7421    7.2778    4.429370379    -2.510514134    -2.890876402    0.734        0.073333333
> « 20    1    4    2600    0    -2.0822    -3.5216    2.597    7.6632    9.4505    9.2404    3.994177574    -2.121340179    -3.875411777    0.7408        0.050666667
> « 20    1    5    1268.9969    1    2.463    4.5837    4.0916    3.4363    4.2989    -2.1573    3.927884406    -1.754642861    -2.737213207    0.7516        0.014666667
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 0
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « 
> « Editorial Board, NeuroImage
> « David King Hall 2052
> « George Mason University
> « MSN 3F5, 4400 University Drive
> « Fairfax, VA 22030-4444
> « 
> « Ph: 703 993-4268
> « fax: 703 993-1359
> « email: Pgreenw1 at gmu.edu
> « http://psychology.gmu.edu/people/pgreenw1
> « 
> « 
> «    [[alternative HTML version deleted]]
> « 
> « _______________________________________________
> « R-sig-mixed-models at r-project.org mailing list
> « https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> 
> -- 
>                                Emmanuel CURIS
>                                emmanuel.curis at parisdescartes.fr
> 
> Page WWW: http://emmanuel.curis.online.fr/index.html
> 
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


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