Posts

Showing posts with the label mixed-models

mgcv_1.8-24: “fREML” or “REML” method of bam() gives wrong explained deviance

mgcv_1.8-24: “fREML” or “REML” method of bam() gives wrong explained deviance Fitting the same model with bam using methods "fREML" and "REML" gave me close results, but the deviance explained is rather different as returned by summary.gam . bam summary.gam With "fREML" the quantity is ~3.5% (not good) while with "REML" it is ~50% (not that bad). How can it be possible? Which one is correct? Unfortunately, I cannot provide a simple reproducible example. ####################################### ## method = "fREML", discrete = TRUE ## ####################################### Family: binomial Link function: logit Formula: ObsOrRand ~ s(Var1, k = 3) + s(RandomVar, bs = "re") Parametric coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -5.0026 0.2199 -22.75 <2e-16 Approximate significance of smooth terms: edf Ref.df Chi.sq p-value s(Var1) 1.00 1.001 17.54 2.82e-0...