Skip to content

Commit 81eeb8b

Browse files
committed
expand SSmodel documentation for nls
1 parent 3e77fea commit 81eeb8b

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

man/SSarrhenius.Rd

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ SSlomolino(area, Asym, xmid, slope)
3232
}
3333
}
3434
\details{
35+
These functions are intended to be used as self-starting models in
36+
non-linear regression (\code{\link{nls}}). There are several functions
37+
that can be used to further handle \code{nls} result, including
38+
\code{summary}, \code{confint} and many more (see \code{\link{nls}}).
39+
3540
All these functions are assumed to be used for species richness
3641
(number of species) as the independent variable, and area or sample
3742
size as the independent variable. Basically, these define least
@@ -73,7 +78,10 @@ SSlomolino(area, Asym, xmid, slope)
7378
Numeric vector of the same length as \code{area}. It is the value of
7479
the expression of each model. If all arguments are names of objects
7580
the gradient matrix with respect to these names is attached as an
76-
attribute named \code{gradient}.
81+
attribute named \code{gradient}. This result object will be used in
82+
non-linear regression in function \code{\link{nls}} which returns its
83+
own result object with many support functions documented with
84+
\code{\link{nls}}.
7785
}
7886
\references{
7987
Dengler, J. (2009) Which function describes the species-area
@@ -105,6 +113,7 @@ plot(S ~ area, sipoo.map, xlab = "Island Area (ha)",
105113
## The Arrhenius model
106114
marr <- nls(S ~ SSarrhenius(area, k, z), data=sipoo.map)
107115
marr
116+
summary(marr)
108117
## confidence limits from profile likelihood
109118
confint(marr)
110119
## draw a line
@@ -113,7 +122,7 @@ lines(xtmp, predict(marr, newdata=data.frame(area = xtmp)), lwd=2)
113122
## The normal way is to use linear regression on log-log data,
114123
## but this will be different from the previous:
115124
mloglog <- lm(log(S) ~ log(area), data=sipoo.map)
116-
mloglog
125+
summary(mloglog) # (Intercept) is log(k) of SSarrhenius result
117126
lines(xtmp, exp(predict(mloglog, newdata=data.frame(area=xtmp))),
118127
lty=2)
119128
## Gleason: log-linear
@@ -126,7 +135,7 @@ lines(xtmp, predict(mgit, newdata=data.frame(area=xtmp)),
126135
lwd=2, col = 3)
127136
## Lomolino: using original names of the parameters (Lomolino 2000):
128137
mlom <- nls(S ~ SSlomolino(area, Smax, A50, Hill), sipoo.map)
129-
mlom
138+
summary(mlom)
130139
lines(xtmp, predict(mlom, newdata=data.frame(area=xtmp)),
131140
lwd=2, col = 4)
132141
## One canned model of standard R:

0 commit comments

Comments
 (0)