Learn R Programming

RVAideMemoire (version 0.9-6)

least.rect: Least rectangles linear regression

Description

Return information about a least rectangle linear regression : equation, confidence interval of parameters, equality of the slope to a given value and Pearson's linear correlation coefficient.

Usage

least.rect(x, y, conf.level = 0.95, theo = 1)

Arguments

x
numeric vector (variable drawn in abscissa).
y
numeric vector (variable drawn in ordinate).
conf.level
confidence level.
theo
theoretical value of the slope.

Value

  • coefficientsregression parameters.
  • xname of the x variable.
  • yname of the y variable.
  • residualsresiduals.
  • fitted.valuesfitted values.
  • conf.levelconfidence level.
  • conf.intconfidence interval of regression parameters.
  • slope.theotheoretical value of the slope.
  • df.compdegrees of freedom for equality of the slope to the theoretical value.
  • t.comptest statitics for equality of the slope to the theoretical value.
  • p.compp-value for equality of the slope to the theoretical value.
  • modelvalues of x and y variables.
  • compdata.frame of results for equality of the slope to the theoretical value.
  • rPearson's linear correlation coefficient and confidence interval.
  • r.dfdegrees of freedom for significativity of the correlation coefficient.
  • r.ttest statistics for significativity of the correlation coefficient.
  • r.pp-value for significativity of the correlation coefficient.
  • corrdata.frame of results for significativity of the correlation coefficient.

See Also

cor.test

Examples

Run this code
x<-1:30+rnorm(30,0,3)
y<-1:30+rnorm(30,0,3)
least.rect(x,y)

Run the code above in your browser using DataLab