Skip to content

Commit

Permalink
Merge pull request #1018 from stan-dev/remove-mentions-of-read_stan_csv
Browse files Browse the repository at this point in the history
Don't recommend `rstan::read_stan_csv`
  • Loading branch information
jgabry authored Jul 31, 2024
2 parents 0e3a99a + 8b72eac commit e45fa00
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 56 deletions.
5 changes: 0 additions & 5 deletions R/model.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@
#' # Plot posterior using bayesplot (ggplot2)
#' mcmc_hist(fit_mcmc$draws("theta"))
#'
#' # For models fit using MCMC, if you like working with RStan's stanfit objects
#' # then you can create one with rstan::read_stan_csv()
#' # stanfit <- rstan::read_stan_csv(fit_mcmc$output_files())
#'
#'
#' # Run 'optimize' method to get a point estimate (default is Stan's LBFGS algorithm)
#' # and also demonstrate specifying data as a path to a file instead of a list
#' my_data_file <- file.path(cmdstan_path(), "examples/bernoulli/bernoulli.data.json")
Expand Down
5 changes: 0 additions & 5 deletions man/CmdStanModel.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions man/cmdstan_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions man/cmdstanr-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions man/model-method-optimize.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions man/model-method-pathfinder.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions man/model-method-sample.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions man/model-method-variational.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions vignettes/cmdstanr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -326,22 +326,6 @@ CmdStan itself provides a `diagnose` utility that can be called using
the `$cmdstan_diagnose()` method. This method will print warnings but won't return anything.


### Create a `stanfit` object

If you have RStan installed then it is also possible to create a `stanfit`
object from the csv output files written by CmdStan. This can be done by using
`rstan::read_stan_csv()` in combination with the `$output_files()` method of the
`CmdStanMCMC` object. This is only needed if you want to fit a model with
CmdStanR but already have a lot of post-processing code that assumes a `stanfit`
object. Otherwise we recommend using the post-processing functionality provided
by CmdStanR itself.

```{r stanfit, eval=FALSE}
stanfit <- rstan::read_stan_csv(fit$output_files())
```



## Running optimization and variational inference

CmdStanR also supports running Stan's optimization algorithms and its algorithms
Expand Down

0 comments on commit e45fa00

Please sign in to comment.