Description Usage Arguments Value Author(s) Examples
This function returns the anova table with the partition of the total sum of squares into due the regression model and residuals and the corresponding R^2 (adjusted for the null model).
1 | R2nls(nls.obj)
|
nls.obj |
a object of class |
a list with two slots. The first named anova
is the
table with partition of the total sum of squares (adjusted for
the mean or null model or intercept inly model) in regression sum
of squares and residual sum of squares. The second named
R2
is the coefficient of determination.
Walmes Zeviani, walmes@ufr.br
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | da <- subset(DNase, Run == 4)
plot(density ~ log(conc), data = da)
m0 <- nls(density ~ Asym/(1 + exp(-(log(conc) - xmid)/scal)),
start = list(Asym = 2.3, xmid = 1.5, scal = 1),
data = da)
summary(m0)
plot(density ~ log(conc), data = da)
with(as.list(coef(m0)),
curve(Asym/(1 + exp(-(x - xmid)/scal)),
add = TRUE, col = 2))
R2nls(m0)
cor(fitted(m0), da$density)^2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.