Skip to content

Help for AIC and REML score #114

@iandanilevicz

Description

@iandanilevicz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions