| rp.lm | R Documentation |
This function is primarily intended to provide graphical representations of linear models with no more than two explanatory variables. These can be covariates or factors or a mixture of the two. When there are more than two explanatory variables the model is passed on to the rp.coefficients or rp.drop1 functions.
rp.lm(x, ylab, xlab, zlab, panel = TRUE, panel.plot = TRUE,
style = 'ggplot', plot.nodes = FALSE,
uncertainty.display = 'density', inference = 'coefficients',
ci = TRUE, cols, display.model, comparison.model,
residuals.showing, linewidth = 1,
hscale = 1, vscale = hscale, ...)
x |
a formula defining the linear model or a fitted linear model object. |
ylab, xlab, zlab |
character variables used for the axis labels. |
panel |
a logical value which determines whether a panel is created to allow interactive control of the fitted models. |
panel.plot |
a logical value which determines whether the plot is placed inside the panel (TRUE) or the standard graphics window (FALSE). |
style |
a character variable determining whether |
plot.nodes |
a logical value, relevant only when the function is called in non-interactive mode ( |
uncertainty.display |
a character value which determines whether the uncertainty display is in |
inference |
a character value which determines whether the inference display is based on |
ci |
a logical value which is passed to the |
cols |
a named character vector of colours to be used in constructing the display. See |
display.model |
a one sided formula which determines the specific model to be displayed. This can be a reduced model which omits some of the terms present in the model defined by |
comparison.model |
a one sided formula which determines the specific model to be compared with the displayed model. This can be a reduced model which omits some of the terms present in the model defined by |
residuals.showing |
a logical value which determines whether residuals are displayed when there are two covariates. |
linewidth |
a numerical value which sets the |
hscale, vscale |
scaling parameters for the size of the plot when |
... |
other arguments passed on to |
The display of the data is adapted to the form of the explanatory variables. When panel = TRUE a lattice of potential models is displayed in graphical form. When a node of the lattice is clicked the corresponding fitted model is displayed. When a connection between adjacent models is clicked, a comparison of the two adjacent models is displayed, either as model coefficients (display = 'coefficients') or model terms (display = 'coefficients').
When the model defined by x contains two explanatory variables, where at least one is a factor, the models which can be fitted include the interaction term, even where this is not explicitly included in x.
When there are exactly two covariates in x, the function will not consider an interaction between these, even when x includes this.
If display.model is not specified, its default setting is NULL when panel = TRUE and the model specified by x when panel = FALSE.
Missing data are removed before the linear models are fitted.
Nothing is returned.
rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.
## Not run:
y <- rnorm(50, mean = 10, sd = 0.5)
rp.normal(y)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.