Skip to content

Commit cbaba93

Browse files
committed
update Examples for new SSmodel examples
1 parent 81eeb8b commit cbaba93

File tree

1 file changed

+45
-11
lines changed

1 file changed

+45
-11
lines changed

tests/Examples/vegan-Ex.Rout.save

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,22 @@ Nonlinear regression model
411411

412412
Number of iterations to convergence: 5
413413
Achieved convergence tolerance: 1.056e-06
414+
> summary(marr)
415+
416+
Formula: S ~ SSarrhenius(area, k, z)
417+
418+
Parameters:
419+
Estimate Std. Error t value Pr(>|t|)
420+
k 3.40619 0.40790 8.351 3.16e-07 ***
421+
z 0.43644 0.02743 15.910 3.15e-11 ***
422+
---
423+
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
424+
425+
Residual standard error: 2.209 on 16 degrees of freedom
426+
427+
Number of iterations to convergence: 5
428+
Achieved convergence tolerance: 1.056e-06
429+
414430
> ## confidence limits from profile likelihood
415431
> confint(marr)
416432
Waiting for profiling to be done...
@@ -423,14 +439,25 @@ z 0.3813576 0.4944693
423439
> ## The normal way is to use linear regression on log-log data,
424440
> ## but this will be different from the previous:
425441
> mloglog <- lm(log(S) ~ log(area), data=sipoo.map)
426-
> mloglog
442+
> summary(mloglog) # (Intercept) is log(k) of SSarrhenius result
427443

428444
Call:
429445
lm(formula = log(S) ~ log(area), data = sipoo.map)
430446

447+
Residuals:
448+
Min 1Q Median 3Q Max
449+
-0.87519 -0.11897 0.05503 0.19842 0.40087
450+
431451
Coefficients:
432-
(Intercept) log(area)
433-
1.0111 0.4925
452+
Estimate Std. Error t value Pr(>|t|)
453+
(Intercept) 1.01109 0.14897 6.787 4.36e-06 ***
454+
log(area) 0.49252 0.05565 8.850 1.46e-07 ***
455+
---
456+
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
457+
458+
Residual standard error: 0.3163 on 16 degrees of freedom
459+
Multiple R-squared: 0.8304, Adjusted R-squared: 0.8198
460+
F-statistic: 78.32 on 1 and 16 DF, p-value: 1.462e-07
434461

435462
> lines(xtmp, exp(predict(mloglog, newdata=data.frame(area=xtmp))),
436463
+ lty=2)
@@ -444,16 +471,23 @@ Coefficients:
444471
+ lwd=2, col = 3)
445472
> ## Lomolino: using original names of the parameters (Lomolino 2000):
446473
> mlom <- nls(S ~ SSlomolino(area, Smax, A50, Hill), sipoo.map)
447-
> mlom
448-
Nonlinear regression model
449-
model: S ~ SSlomolino(area, Smax, A50, Hill)
450-
data: sipoo.map
451-
Smax A50 Hill
452-
53.493 94.697 2.018
453-
residual sum-of-squares: 55.37
474+
> summary(mlom)
475+
476+
Formula: S ~ SSlomolino(area, Smax, A50, Hill)
477+
478+
Parameters:
479+
Estimate Std. Error t value Pr(>|t|)
480+
Smax 53.493 13.849 3.863 0.00153 **
481+
A50 94.697 74.964 1.263 0.22578
482+
Hill 2.018 0.235 8.587 3.56e-07 ***
483+
---
484+
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
485+
486+
Residual standard error: 1.921 on 15 degrees of freedom
454487

455488
Number of iterations to convergence: 6
456489
Achieved convergence tolerance: 9.715e-07
490+
457491
> lines(xtmp, predict(mlom, newdata=data.frame(area=xtmp)),
458492
+ lwd=2, col = 4)
459493
> ## One canned model of standard R:
@@ -9177,7 +9211,7 @@ Procrustes sum of squares:
91779211
> cleanEx()
91789212
> options(digits = 7L)
91799213
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
9180-
Time elapsed: 8.784 0.398 9.198 0 0
9214+
Time elapsed: 8.8 0.411 9.234 0 0
91819215
> grDevices::dev.off()
91829216
null device
91839217
1

0 commit comments

Comments
 (0)