plot.bctrans {alr3} | R Documentation |
Extract, view, and plot useful summaries of a ‘bctrans’ object for transformations to normality.
## S3 method for class 'bctrans' plot(x,y=x$Y, lambda=coef(x),family=x$family,plot=pairs,...) ## S3 method for class 'bctrans' summary(object, digits=4, ...) ## S3 method for class 'bctrans' coef(object,...) ## S3 method for class 'bctrans' vcov(object,...)
x |
An object created by |
y |
If not NULL, add this variable to the scatterplot matrix |
object |
An object created by |
lambda |
A vector of transformation parameters. |
family |
A family of transformations, probably |
plot |
Name of the plotting function to view the results, usually
|
digits |
Accuracy of summary output for ‘bctrans’ objects. |
... |
Arguments passed to the plotting method. |
The plot
method is used for its side effect of producing a scatterplot matrix.
The helper summary
summarizes a bctrans object. This helper calls
lrt.bctrans
, but the latter can be
called directly. The helpers coef
and vcov
return, respectively, the estimated value of lambda, and an estimate of
its covariance matrix (based on a profile log-likelihood).
Sanford Weisberg, sandy@stat.umn.edu
Weisberg, S. (2005) Applied Linear Regression, third edition. Wiley.
bctrans
, lrt.bctrans
,
pairs
,
inv.res.plot
data(highway) b <- highway[,c(8,1,2,10,5)] # select interesting columns summary(ans <- bctrans(b,family="yeo.johnson")) # zeros ==> use yeo.johnson b$Sigs <- (round(b$Sigs*b$Len)+1)/b$Len # redefine so no zeroes summary(ans <- bctrans(b)) # fit with box.cox b$Sigs <- (round(b$Sigs*b$Len)+1)/b$Len # redefine so no zeroes summary(ans <- bctrans(b)) # fit with box.cox lrt.bctrans(ans,lrt=list(c(0,-1,1,0))) plot(ans,family="power") # plot, but use ordinary powers b <- cbind(b,powtran(ans)) # add transformed variables to data frame