Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running Storable Vignette (stan_polr) #130

Open
bsbodden opened this issue Apr 30, 2023 · 1 comment
Open

Error when running Storable Vignette (stan_polr) #130

bsbodden opened this issue Apr 30, 2023 · 1 comment

Comments

@bsbodden
Copy link

The call to stan_polr in:

fit_1 <- stan_polr(factor_vote ~ value, data = data_401,
                   prior = R2(0.3, "mean"), refresh = 0)

Produces the error:

Error in cor(obs, pred, use = ifelse(na.rm, "complete.obs", "everything")) :
'x' must be numeric
  5. stop("'x' must be numeric")
  4. cor(obs, pred, use = ifelse(na.rm, "complete.obs", "everything"))
  3. R2(0.3, "mean")
  2. stan_polr.fit(x = x, y = y, wt = wt, offset = offset, method = method,
            prior = prior, prior_counts = prior_counts, shape = shape,
            rate = rate, prior_PD = prior_PD, algorithm = algorithm,
            adapt_delta = adapt_delta, do_residuals = do_residuals, ...)
1. stan_polr(factor_vote ~ value, data = data_401, prior = R2(0.3, "mean"), refresh = 0)

Versions:

R version 4.2.3 (2023-03-15)
> packageVersion("rstanarm")   
[1] ‘2.21.4’
@andrewgelman
Copy link

It's a bug, something to do with R, it's getting fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants