Description Usage Arguments Value See Also Examples
The data frame that is returned contains the variables that are used in the model and additionally a variable with the transformed dependent variable. To the variable name of the dependent variable a t is added for transformed.
1 2 3 |
x |
an object of type |
row.names |
NULL or a character vector giving the row names for the data frame. Missing values are not allowed. |
optional |
logical. If TRUE, setting row names and converting column names (to syntactic names: see make.names) is optional. Note that all of R's base package as.data.frame() methods use optional only for column names treatment, basically with the meaning of data.frame(*, check.names = !optional) |
std |
logical. If |
... |
other parameters that can be passed to the function. |
A data frame with the original variables and the transformed variable.
bickeldoksum
, boxcox
, dual
,
glog
, gpower
, log
,
logshiftopt
, manly
, modulus
,
neglog
, sqrtshift
, yeojohnson
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Load data
data("cars", package = "datasets")
# Fit linear model
lm_cars <- lm(dist ~ speed, data = cars)
# Transform dependent variable using divergence minimization following
# Kolmogorov-Smirnov
logshiftopt_trafo <- logshiftopt(object = lm_cars, method = "div.ks",
plotit = FALSE)
# Get a data frame with the added transformed variable
as.data.frame(logshiftopt_trafo)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.