Learn R Programming

Blossom (version 1.3)

ols: Ordinary least squares regression

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

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

Arguments

Value

ols returns an object of class LADObj.

Details

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

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

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

Run the code above in your browser using DataLab