Skip to content

simulate() fails for binomial spatiotemporal model with weights #465

@akshayanand93

Description

@akshayanand93

I have fit an AR(1) spatiotemporal model with the following specification:

model <- smdTMB(y ~ poly(x1, 2) + poly(x2, 2) + poly(x3, 2),
data = dat_train,
weights = dat_train$weights,
extra_time = 18:19,
mesh = mesh,
spatial = "off",
spatiotemporal = "ar1",
family = binomial(link = "cloglog"),
time = "time_step")

I am now trying to use the simulate() function to get epsilon corrected estimates like this:

sims <- simulate(model,
newdata = dat,
type = "mle-mvn",
mle_mvn_samples = "multiple",
nsim = 500,
observation_error = FALSE)

My "dat" here contains the training data that I used to fit the model along with some holdout data with the extra time steps specified during model fitting. However, the simulate() function returns the error "This function hasn't been set up to work with binomial size specified yet."

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