powered by
Compute predicted from a stanreg model.
# S3 method for stanreg get_predicted(fit, prob = 0.9, draws = 500, newdf = FALSE, precision = 10, ...)
A stanreg model.
Probability of credible intervals (0.9 (default) will compute 5-95% CI).
Precision of the estimate.
Should the predictions be based on actual data or, generate a new dataframe based on all combinations of values
Precision of the new dataframe to be generated.
Arguments passed to or from other methods.
dataframe with predicted values.
# NOT RUN { library(psycho) require(rstanarm) fit <- rstanarm::stan_glm(vs ~ mpg * cyl, data=mtcars) predicted <- get_predicted(fit) # }
Run the code above in your browser using DataLab