symbox | R Documentation |
symbox
first transforms x
to each of a series
of selected powers, with each transformation standardized to mean 0 and
standard deviation 1. The results are then displayed side-by-side in boxplots, permiting
a visual assessment of which power makes the distribution reasonably symmetric.
For the "lm"
method, the response variable in the model is successively
transformed.
symbox(x, ...)
## S3 method for class 'formula'
symbox(formula, data=NULL, subset, na.action=NULL, ylab, ...)
## Default S3 method:
symbox(x, powers = c(-1, -0.5, 0, 0.5, 1), start,
trans=bcPower, xlab="Powers", ylab, ...)
## S3 method for class 'lm'
symbox(x, powers = c(-1, -0.5, 0, 0.5, 1), start, trans=bcPower,
xlab, ylab="Studentized residuals", ...)
x |
a numeric vector. |
formula |
a one-sided formula specifying a single numeric variable. |
data , subset , na.action |
as for statistical modeling functions (see, e.g., |
xlab , ylab |
axis labels; if |
powers |
a vector of selected powers to which |
start |
a constant to be added to |
trans |
a transformation function whose first argument is a numeric vector and whose second
argument is a transformation parameter, given by the |
... |
arguments to be passed down. |
as returned by boxplot
.
Gregor Gorjanc, John Fox jfox@mcmaster.ca.
Fox, J. and Weisberg, S. (2019) An R Companion to Applied Regression, Third Edition. Sage.
boxplot
, boxcox
, bcPower
, yjPower
symbox(~ income, data=Prestige)
symbox(lm(wages ~ education + poly(age, 2) + sex, data=SLID))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.