diff --git a/R/model.R b/R/model.R index 82c1f814..e17ffbd4 100644 --- a/R/model.R +++ b/R/model.R @@ -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") diff --git a/man/CmdStanModel.Rd b/man/CmdStanModel.Rd index 3bacdd50..0b21ac5c 100644 --- a/man/CmdStanModel.Rd +++ b/man/CmdStanModel.Rd @@ -104,11 +104,6 @@ as_draws_df(draws) # 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") diff --git a/man/cmdstan_model.Rd b/man/cmdstan_model.Rd index bca22a30..2107105a 100644 --- a/man/cmdstan_model.Rd +++ b/man/cmdstan_model.Rd @@ -90,11 +90,6 @@ as_draws_df(draws) # 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") diff --git a/man/cmdstanr-package.Rd b/man/cmdstanr-package.Rd index eb8ae80c..2bf89d28 100644 --- a/man/cmdstanr-package.Rd +++ b/man/cmdstanr-package.Rd @@ -120,11 +120,6 @@ as_draws_df(draws) # 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") diff --git a/man/model-method-optimize.Rd b/man/model-method-optimize.Rd index 4bafc8de..7acae8c7 100644 --- a/man/model-method-optimize.Rd +++ b/man/model-method-optimize.Rd @@ -271,11 +271,6 @@ as_draws_df(draws) # 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") diff --git a/man/model-method-pathfinder.Rd b/man/model-method-pathfinder.Rd index def65083..ff7260bb 100644 --- a/man/model-method-pathfinder.Rd +++ b/man/model-method-pathfinder.Rd @@ -296,11 +296,6 @@ as_draws_df(draws) # 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") diff --git a/man/model-method-sample.Rd b/man/model-method-sample.Rd index bb725b12..2558e630 100644 --- a/man/model-method-sample.Rd +++ b/man/model-method-sample.Rd @@ -370,11 +370,6 @@ as_draws_df(draws) # 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") diff --git a/man/model-method-variational.Rd b/man/model-method-variational.Rd index 98de91de..5deafe84 100644 --- a/man/model-method-variational.Rd +++ b/man/model-method-variational.Rd @@ -271,11 +271,6 @@ as_draws_df(draws) # 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") diff --git a/vignettes/cmdstanr.Rmd b/vignettes/cmdstanr.Rmd index 553701c3..8d9e3046 100644 --- a/vignettes/cmdstanr.Rmd +++ b/vignettes/cmdstanr.Rmd @@ -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