8000 storing (or not) large correlation matrices, corr printing · Issue #1188 · glmmTMB/glmmTMB · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
storing (or not) large correlation matrices, corr printing #1188
Open
@bbolker

Description

@bbolker

I'm working my way through some significant updates to correlation handling, and have some thoughts/questions/requests for comment. (Code is in the ar_memfix branch.)

  • Memory allocation error #995 highlights that we are sometimes creating giant correlation matrices, purely for reporting purposes, when we don't really have to. (There are some other issues relating to the creation of giant (dense) contrast matrices, but that's a problem that we will have to deal with in the reformulas package.)
  • I started by simply chopping out the code that creates the correlation matrices from the ar1 and ou covstructs, e.g. here, only storing the phi value.
  • However, I think there should probably be a flag, to be set in glmmTMBControl (e.g. return_full_corrmat?); the default could be (denoted by NULL value?) to return the full corrmat if it would be (say) less than 20x20, or something reasonable. This behaviour should probably apply across all covstruct types.
  • This is separate from how VarCorr objects are constructed on the R side after the model is fitted (VarCorr/mkVC), and how VarCorr objects are formatted/printed. What should a VarCorr object actually contain when the covariance matrix is too big to be practical (when return_full_cormat is FALSE)? In some cases it could be a sparse object, but in many cases (e.g. AR1/OU/spatial) it should probably be something like an empty (0x0) numeric matrix ...
  • I've been writing (S3) methods for printing individual components of VarCorr objects based on their cov structs. These will have to work whether or not the full matrix is available ...

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

      0