Rsq {soilphysics} | R Documentation |
Multiple R-squared
Description
Function to calculate the multiple R-squared and the adjusted
R-squared from a fitted model via lm
or aov
, i.e., linear models.
For a model fitted via nls
, nonlinear models, the pseudo R-squared is
returned.
Usage
Rsq(model)
Arguments
model |
Value
A list of
R.squared |
the multiple R-squared (for linear models) or the Pseudo R-squared (for nonlinear models). |
adj.R.squared |
the adjusted R-squared. |
Author(s)
Anderson Rodrigo da Silva <anderson.agro@hotmail.com>
See Also
lm
, summary.lm
, aov
,
nls
Examples
# example 1 [linear model]
y <- rnorm(10)
x <- 1:10
fit <- lm(y ~ x)
summary(fit)
Rsq(fit)
# example 2 [nonlinear model for Load Bearing Capacity]
data(compaction)
attach(compaction)
out <- fitlbc(theta = Mois, sigmaP = PS)
summary(out)
Rsq(out)
# End (not run)
[Package soilphysics version 5.0 Index]