# invTranPlot

0th

Percentile

##### Choose a Predictor Transformation Visually or Numerically

invTranPlot draws a two-dimensional scatterplot of $Y$ versus $X$, along with the OLS fit from the regression of $Y$ on $(X^{\lambda}-1)/\lambda$. invTranEstimate finds the nonlinear least squares estimate of $\lambda$ and its standard error.

Keywords
regression, hplot
##### Usage
invTranPlot(x, ...)# S3 method for formula
invTranPlot(x, data, subset, na.action, ...)# S3 method for default
invTranPlot(x, y, lambda=c(-1, 0, 1), robust=FALSE,
lty.lines=rep(c("solid", "dashed", "dotdash", "longdash", "twodash"),
length=1 + length(lambda)), lwd.lines=2,
col=palette()[1], col.lines=palette(),
xlab=deparse(substitute(x)), ylab=deparse(substitute(y)),
family="bcPower", optimal=TRUE, key="auto",
id.method = "x",
labels,
id.n = if(id.method[1]=="identify") Inf else 0,
id.cex=1, id.col=palette()[1], id.location="lr", grid=TRUE, ...)invTranEstimate(x, y, family="bcPower", confidence=0.95, robust=FALSE)
##### Arguments
x

The predictor variable, or a formula with a single response and a single predictor

y

The response variable

data

An optional data frame to get the data for the formula

subset

Optional, as in lm, select a subset of the cases

na.action

Optional, as in lm, the action for missing data

lambda

The powers used in the plot. The optimal power than minimizes the residual sum of squares is always added unless optimal is FALSE.

robust

If TRUE, then the estimated transformation is computed using Huber M-estimation with the MAD used to estimate scale and k=1.345. The default is FALSE.

family

The transformation family to use, "bcPower", "yjPower", or a user-defined family.

confidence

returns a profile likelihood confidence interval for the optimal transformation with this confidence level. If FALSE, or if robust=TRUE, no interval is returned.

optimal

Include the optimal value of lambda?

lty.lines

line types corresponding to the powers

lwd.lines

the width of the plotted lines, defaults to 2 times the standard

col

color(s) of the points in the plot. If you wish to distinguish points according to the levels of a factor, we recommend using symbols, specified with the pch argument, rather than colors.

col.lines

color of the fitted lines corresponding to the powers. The default is to use the colors returned by palette

key

The default is "auto", in which case a legend is added to the plot, either above the top marign or in the bottom right or top right corner. Set to NULL to suppress the legend.

xlab

Label for the horizontal axis.

ylab

Label for the vertical axis.

id.method,labels,id.n,id.cex,id.col,id.location

Arguments for the labelling of points. The default is id.n=0 for labeling no points. See showLabels for details of these arguments.

...

Additional arguments passed to the plot method, such as pch.

grid

If TRUE, the default, a light-gray background grid is put on the graph

##### Value

invTranPlot plots a graph and returns a data frame with $\lambda$ in the first column, and the residual sum of squares from the regression for that $\lambda$ in the second column.

invTranEstimate returns a list with elements lambda for the estimate, se for its standard error, and RSS, the minimum value of the residual sum of squares.

##### References

Fox, J. and Weisberg, S. (2011) An R Companion to Applied Regression, Second Edition, Sage.

Pendergast, L, and Sheather, S. (in press). On sensitivity of response plot estimation of a robust estimation approach. Scandinavian Journal of Statistics.

Weisberg, S. (2014) Applied Linear Regression, Fourth Edition, Wiley Wiley.

inverseResponsePlot,optimize

##### Aliases
• invTranPlot
• invTranPlot.default
• invTranPlot.formula
• invTranEstimate
##### Examples
# NOT RUN {
with(UN, invTranPlot(gdp, infant.mortality))
with(UN, invTranEstimate(gdp, infant.mortality))
# }

Documentation reproduced from package car, version 2.1-6, License: GPL (>= 2)

### Community examples

Looks like there are no examples yet.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.4605661928653717, "perplexity": 4638.714574695225}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2019-47/segments/1573496670162.76/warc/CC-MAIN-20191119172137-20191119200137-00468.warc.gz"}