lm.simple: Regression Slope by a Simple Comparison of Average Values in...

Description Usage Arguments References Examples

View source: R/lm-simple.R

Description

Regression Slope by a Simple Comparison of Average Values in the Upper and Lower Quantiles

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
lm.simple(x, y, frac = "auto", na.rm = FALSE)

## S3 method for class 'lm.simple'
print(x, ...)

## S3 method for class 'lm.simple'
predict(object, newdata)

## S3 method for class 'lm.simple'
summary(x, ...)

## S3 method for class 'lm.simple'
plot(x, type = c("fitted", "residuals"), ...)

Arguments

x, y

variables.

frac

fraction of data to be kept in the upper and lower range of x. Values of frac should be greater than 0 and lower or equal than 0.5.

References

Gelman, A., & Park, D.K. (2009). Splitting a predictor at the upper quarter or third and the lower quarter or third. The American Statistician, 63(1).

Examples

1
2
3
attach(mtcars)
lm.simple(mpg, disp)
lm.simple(mpg, disp, frac = .25)

twolodzko/twextras documentation built on May 3, 2019, 1:52 p.m.