Skip to content

NA's in coefs or vcov lead to error in predict() #7

@graemeblair

Description

@graemeblair

When there are NA's in either the coefficient estimates or the variance-covariance matrix (not sure which, likely both), then the following error results at least in some cases:

> predict(ictreg_results, se.fit = TRUE, avg = TRUE, interval = "confidence")

Error in vcov[(nPar + 1):(nPar * 2), (nPar + 1):(nPar * 2)] :
subscript out of bounds

I suspect predict.lm() just drops those coefficients in calculating the predictions, so perhaps we can do that too. I can't reproduce this error at the moment.

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