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

Can't set D to Inf #179

Closed
sbfnk opened this issue Dec 10, 2024 · 0 comments · Fixed by #180
Closed

Can't set D to Inf #179

sbfnk opened this issue Dec 10, 2024 · 0 comments · Fixed by #180

Comments

@sbfnk
Copy link
Contributor

sbfnk commented Dec 10, 2024

To reproduce

library("primarycensored")
pcd_model <- pcd_cmdstan_model()
data <- data.frame(
  delay = c(1, 2, 3),
  delay_upper = c(2, 3, 4),
  n = c(10, 20, 15),
  pwindow = c(1, 1, 2),
  relative_obs_time = c(Inf, Inf, Inf)
)
stan_data <- pcd_as_stan_data(
  data,
  dist_id = 1,
  primary_id = 1,
  param_bounds = list(lower = c(0, 0), upper = c(10, 10)),
  primary_param_bounds = list(lower = numeric(0), upper = numeric(0)),
  priors = list(location = c(1, 1), scale = c(1, 1)),
  primary_priors = list(location = numeric(0), scale = numeric(0))
)
pcd_model$sample(data = stan_data)
#> Warning: A non-integer value was supplied for 'D'! It will be truncated to an
#> integer.
#> Warning in mde(x): NAs introduced by coercion to integer range
#> Error: Variable 'D' has NA values.

Created on 2024-12-10 with reprex v2.1.1

@sbfnk sbfnk mentioned this issue Dec 10, 2024
9 tasks
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

Successfully merging a pull request may close this issue.

1 participant