slm.methods

0th

Percentile

Methods for slm objects

Summarize, print, and extract objects from slm objects.

Keywords
regression
Usage
# S3 method for slm
summary(object, correlation, …)
# S3 method for mslm
summary(object, …)
# S3 method for slm
print(x, digits, …)
# S3 method for summary.slm
print(x, digits, symbolic.cor, signif.stars, …)
# S3 method for slm
fitted(object, …)
# S3 method for slm
residuals(object, …)
# S3 method for slm
coef(object, …)
# S3 method for slm
extractAIC(fit, scale = 0, k = 2, …)
# S3 method for slm
deviance(object, …)
Arguments
object,x,fit

object of class slm.

digits

minimum number of significant digits to be used for most numbers.

scale

optional numeric specifying the scale parameter of the model, see 'scale' in 'step'. Currently only used in the '"lm"' method, where 'scale' specifies the estimate of the error variance, and 'scale = 0' indicates that it is to be estimated by maximum likelihood.

k

numeric specifying the "weight" of the equivalent degrees of freedom ('edf') part in the AIC formula.

symbolic.cor

logical; if TRUE, the correlation of coefficients will be printed. The default is FALSE

signif.stars

logical; if TRUE, P-values are additionally encoded visually as ``significance stars'' in order to help scanning of long coefficient tables. It defaults to the `show.signif.stars' slot of `options'.

correlation

logical; if TRUE, the correlation matrix of the estimated parameters is returned and printed.

additional arguments passed to methods.

Value

print.slm and print.summary.slm return invisibly. fitted.slm, residuals.slm, and coef.slm return the corresponding components of the slm object. extractAIC.slm and deviance.slm return the AIC and deviance values of the fitted object.

References

Koenker, R and Ng, P. (2002). SparseM: A Sparse Matrix Package for R, http://www.econ.uiuc.edu/~roger/research

See Also

slm

Aliases
  • slm.methods
  • summary.slm
  • summary.mslm
  • print.summary.slm
  • print.slm
  • fitted.slm
  • residuals.slm
  • coef.slm
  • extractAIC.slm
  • deviance.slm
Examples
# NOT RUN {
data(lsq)
X <- model.matrix(lsq) #extract the design matrix
y <- model.response(lsq) # extract the rhs
X1 <- as.matrix(X)
slm.time <- system.time(slm(y~X1-1) -> slm.o) # pretty fast
cat("slm time =",slm.time,"\n")
cat("slm Results: Reported Coefficients Truncated to 5  ","\n")
sum.slm <- summary(slm.o)
sum.slm$coef <- sum.slm$coef[1:5,]
sum.slm
fitted(slm.o)[1:10]
residuals(slm.o)[1:10]
coef(slm.o)[1:10]
# }
Documentation reproduced from package SparseM, version 1.78, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.