least.rect | R Documentation |
Fits a least rectangle linear regression, possibly for each level of a factor.
least.rect(formula, data, conf.level = 0.95, theo = 1, adj = TRUE)
formula |
a formula of the form |
data |
an optional data frame containing the variables in the formula |
conf.level |
confidence level. |
theo |
theoretical value of the slope. If several regression are fitted, the same value is used for all comparisons of slope vs. theoretical value. |
adj |
logical indicating if, in case of several regressions fitted, confidence intervals and p-values should be Bonferroni-corrected for multiple testing. |
coefficients |
regression parameters. |
residuals |
residuals. |
fitted.values |
fitted values. |
call |
the matched call. |
model |
the model frame used. |
conf.level |
confidence level. |
conf.int |
confidence interval of regression parameters. |
theo |
theoretical value of the slope. |
comp |
data frame of results for equality of the slope(s) to the theoretical value. |
corr |
data frame of results for significativity of the correlation coefficient(s). |
multiple |
logical, |
adj |
logical, |
Maxime HERVE <maxime.herve@univ-rennes1.fr>
x <- 1:30+rnorm(30,0,3)
y <- 1:30+rnorm(30,0,3)
regression1 <- least.rect(y~x)
summary(regression1)
x2 <- c(1:30,1:30)
y2 <- c(1:30+rnorm(30,0,3),seq(10,22,12/29)+rnorm(30,0,3))
fact <- gl(2,30,labels=LETTERS[1:2])
regression2 <- least.rect(y2~x2|fact)
summary(regression2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.