You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem with the AIC when I make a pffr model. I fitted a model like this:
pffr_adj_fit1 = pffr(MIMS ~ age + gender + BMI, data = nhanes_ave[1:500,])
and I found the AIC value like this:
pffr_adj_fit1$aic
However, how is this value calculated? Because I found an astronomical value that doesn't coincide with the formula presented by Krivobokova (2007) or Crainiceanu (2024).
I have a second issue regarding how the REML score is calculated. I can find it, but it doesn't match any proxy that I have.
pffr_adj_fit1$gcv.ubre
References:
Krivobokova, T., & Kauermann, G. (2007). “A Note on Penalized Spline Smoothing with Correlated Errors.” Journal of the American Statistical Association, 102(480), 1328–1337, doi: 10.1198/016214507000000978
Crainiceanu, C.M. et al. (2024). "Functional Data Analysis with R". CRC Press, doi: 10.1201/9781003278726
The text was updated successfully, but these errors were encountered:
Hi,
I tried to achieve the values of AIC and GCV with a simple pffr model using the notation introduced in the help (gam {mgcv}) without success. My code is:
Hi all,
I have a problem with the AIC when I make a pffr model. I fitted a model like this:
pffr_adj_fit1 = pffr(MIMS ~ age + gender + BMI, data = nhanes_ave[1:500,])
and I found the AIC value like this:
pffr_adj_fit1$aic
However, how is this value calculated? Because I found an astronomical value that doesn't coincide with the formula presented by Krivobokova (2007) or Crainiceanu (2024).
n=500
n*log(pffr_adj_fit1$deviance) + 2*sum(pffr_adj_fit1$edf) # Krivobokova equation 4
log(pffr_adj_fit1$deviance) + 2*sum(pffr_adj_fit1$edf)/n # Crainiceanu page 42
I have a second issue regarding how the REML score is calculated. I can find it, but it doesn't match any proxy that I have.
pffr_adj_fit1$gcv.ubre
References:
Krivobokova, T., & Kauermann, G. (2007). “A Note on Penalized Spline Smoothing with Correlated Errors.” Journal of the American Statistical Association, 102(480), 1328–1337, doi: 10.1198/016214507000000978
Crainiceanu, C.M. et al. (2024). "Functional Data Analysis with R". CRC Press, doi: 10.1201/9781003278726
The text was updated successfully, but these errors were encountered: