Learn R Programming

intRegGOF (version 0.85-5)

plot: Integrated Regression Goodness of Fit graphical output

Description

Methods to develop model validation and visualization of Integrated Regression Goodness of Fit technique.

Usage

plotAsIntRegGOF(obj, covar = 1, ADD = FALSE, ...)
  pointsAsIntRegGOF(obj,covar=1,...)
  linesAsIntRegGOF(obj,covar=1,...)

Arguments

obj

An object of class lm, glm or nls.

covar

Variable name, number or vector for which Int. Reg. is computed. If it is a number, it reference a covariate in the model frame, while if it is a name refer to data in data frame using in the fitting process.

ADD

If TRUE the plot is added to existing plot.

Further parameters to for plotobj command.

Details

Currently, the implementation computes the accumulated residual process against a single covariate (covar). When the value of covar is set to 0, the response is used as the variable whose residual are accumulated against.

Notice that if covar is a vector its lenght should be equal to the number of residuals.

See Also

lm, glm, nls its associated plot method and intRegGOF.

Examples

Run this code
# NOT RUN {
  n <- 50
  d <- data.frame( X1=runif(n),X2=runif(n))
  d$Y <- 1 + 2*d$X1 + rnorm(n,sd=.125)
  par(ask=TRUE)
  plot( d ) 
  plotAsIntRegGOF(lm(Y~X1+X2,d),covar="X1") 
  plotAsIntRegGOF(a <- lm(Y~X1-1,d)) 
  plotAsIntRegGOF(a,c("X1")) 
  plotAsIntRegGOF(a,0) 
  plotAsIntRegGOF(a,fitted(a)) 
  par(ask=FALSE)
# }

Run the code above in your browser using DataLab