ols: Ordinary least squares regression

Description Usage Arguments Details Value References See Also Examples

View source: R/ols.r

Description

OLS regression estimates rates of change in conditional means. The permutation testing approaches are identical to those used for LAD regression, and are described in Kennedy and Cade (1996) and Anderson and Legendre (1999). The test statistic is similar in structure to that for LAD regression, except for OLS T_obs equals (sum of squared residuals for reduced parameter model - sum of squared residuals for full parameter model) / sum of squared residuals for full model.

Usage

1
2
ols(formula, data, contrasts,number.perms = 5000, quant,
   test = FALSE, all.quants = FALSE,weights)

Arguments

formula

an object of class formula or a statement that can be coerced to this class.

data

a data frame or object that can be coerced to one using as.data.frame containing the variables and response in the model. If missing the formula is evaluated in the environment from which the original function call was made.

contrasts

an optional list see contrasts for further details.

number.perms

number of permutations used if a Monte Carlo resampling procedure is to be used.

quant

a numeric value which specifies a quantile for which all subsequent testing is done.

test

a logical indicating whether to test if all slope parameters are equal to zero.

all.quants

a logical indicating whether all possible quantile regression estimates should be returned.

weights

a vector of weights to be applied to the response and model frame matrix.

Details

Generally called indirectly via the lad function call with the option OLS set equal to TRUE.

Value

ols returns an object of class LADObj.

References

Anderson, M. J., and P. Legendre. 1999. An empirical comparison of permutation methods for tests of partial regression coefficients in a linear model. Journal Statistical Computation and Simulation 62, 271–303.

Kennedy, P.E., and B.S. Cade. 1996. Randomization tests for multiple regression. Communications in Statistics - Simulation and Computation 25, 923–936.

See Also

lad and hypothesis.test

Examples

1
2
Out <- ols(lcc~-1+apico+picopha,data = fraserf,number.perms = 10000)
summary(Out)

Blossom documentation built on May 29, 2017, 10:55 p.m.

Related to ols in Blossom...