Skip to content

Commit

Permalink
Allow models with no parameters without fixed_param=TRUE (in CmdSta…
Browse files Browse the repository at this point in the history
…n >= 2.36)
  • Loading branch information
jgabry committed Nov 25, 2024
1 parent c681d32 commit ec5d9b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ sample <- function(data = NULL,
}
}

if (cmdstan_version() >= "2.27.0" && !fixed_param) {
if (cmdstan_version() >= "2.27.0" && cmdstan_version() < "2.36.0" && !fixed_param) {
if (self$has_stan_file() && file.exists(self$stan_file())) {
if (!is.null(self$variables()) && length(self$variables()$parameters) == 0) {
stop("Model contains no parameters. Please use 'fixed_param = TRUE'.", call. = FALSE)
Expand Down

0 comments on commit ec5d9b3

Please sign in to comment.