Rsq | R Documentation |
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.
Rsq(model)
model |
a model fitted via |
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. |
Anderson Rodrigo da Silva <anderson.agro@hotmail.com>
lm
, summary.lm
, aov
,
nls
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.