Skip to content

determining sign for changed.rsq in ModelArray.gam #87

@audreycluo

Description

@audreycluo

It'd be great if we can incorporate a linear model for determining the sign of the GAM smooth effect for delta adjusted rsq (what we typically do for age effect). Currently we have to do an extra step for sign determination (proposed by chenying - thank you):

  • run ModelArray.gam() , get the delta adjusted Rsq (without additional sign applied)
  • run ModelArray.lm() for y ~ age + sex , get the coefficient-> then get the sign we need
  • apply the sign we get

https://github.com/PennLINC/ModelArray/blob/main/R/analyse.R#L812-934 that shows how changed.rsq for smooth terms was calculated

The mean derivative is usually used to determine the sign of partial Rsq - also would be great to include.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions