Learn R Programming

RVAideMemoire (version 0.9-6)

ind.contrib: Individual contributions in regression

Description

Compute difference in regression parameters when each individual is dropped, expressed in proportion of the whole regression coefficients. The function deals with "lm" and "least.rect" models.

Usage

ind.contrib(model, print.diff = FALSE, graph = TRUE)

Arguments

model
model (of class "lm" or "least.rect").
print.diff
logical. If TRUE results are printed.
graph
logical. If TRUE results are returned in a graphical way.

Value

  • print.diffprint.diff argument of the function.
  • coefficientscoefficients of each computed regression.
  • coefficients.diffdifference in coefficients between each computed regression and the whole regression.
  • coefficients.propdifference in coefficients expressed in proportion of the whole regression coefficients.

See Also

lm.influence, least.rect

Examples

Run this code
x<-1:30
y<-1:30+rnorm(30,0,4)
model1<-lm(y~x)
model2<-least.rect(x,y)
ind.contrib(model1)
ind.contrib(model2)

Run the code above in your browser using DataLab