linmod: Linear Regression

Description Usage Arguments Value Author(s) Examples

Description

Fit a linear regression model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
linmod(x, ...)

## Default S3 method:
linmod(x, y, ...)

## S3 method for class 'formula'
linmod(formula, data = list(), ...)

## S3 method for class 'linmod'
print(x, ...)

## S3 method for class 'linmod'
summary(object, ...)

## S3 method for class 'summary.linmod'
print(x, ...)

Arguments

x

a numeric design matrix for the model.

y

a numeric vector of responses.

formula

a symbolic description of the model to be fit.

data

an optional data frame containing the variables in the model.

object

an object of class "linmod", i.e., a fitted model.

...

not used.

Value

An object of class logreg, basically a list including elements

coefficients

a named vector of coefficients

vcov

covariance matrix of coefficients

fitted.values

fitted values

residuals

residuals

Author(s)

Friedrich Leisch

Examples

1
2
3
4
data(cats, package="MASS")
mod1 <- linmod(Hwt~Bwt*Sex, data=cats)
mod1
summary(mod1)

lfpdroubi/linmod documentation built on May 21, 2019, 5:12 a.m.