plot.simloglm | R Documentation |
Plot function for a simloglm object
## S3 method for class 'simloglm' plot(input_obj, which_qoi = "median", alpha = 0.05, twosided = TRUE)
input_obj |
Either a list of class "lm" (the output from a call to lm) or a user provided list with the following entries beta_hat (the estimated regression coefficients), varcov_hat (the estimated variance covariance matrix), sigma_hat (the estimated residual standard error), n (the number of observations) and k (the number of regression coefficients). The list can be provided for more flexibility. Most users will call simulate directly on the output from a call to lm. |
which_qoi |
Which mean should be plotted? Median or mean, defaults to "median". |
alpha |
Set the significance level. Default is 0.05. |
twosided |
Do you want two sided confidence intervals? Defaults to TRUE. |
A plot of the simloglm object.
df <- cars regression <- lm(log(dist)~speed, data = df) # Specifiying no scenario to simulate at the mean of speed. plot(simloglm(regression)) # Explicitily specifying a scenario. plot(simloglm(regression, scenario = list(speed = c(5, 10, 20))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.