Last active
October 27, 2015 07:18
-
-
Save mages/ac6356434c96413d8550 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dat <- list( | |
"N" = 27, | |
"x" = | |
c(1, 1.5, 1.5, 1.5, 2.5, 4, 5, 5, 7, 8, 8.5, 9, 9.5, 9.5, 10, | |
12, 12, 13, 13, 14.5, 15.5, 15.5, 16.5, 17, 22.5, 29, 31.5), | |
"Y" = | |
c(1.8, 1.85, 1.87, 1.77, 2.02, 2.27, 2.15, 2.26, 2.47, 2.19, | |
2.26, 2.4, 2.39, 2.41, 2.5, 2.32, 2.32, 2.43, 2.47, 2.56, 2.65, | |
2.47, 2.64, 2.56, 2.7, 2.72, 2.57)) | |
nlm <- nls(Y ~ alpha - beta * lambda^x, data=dat, | |
start=list(alpha=1, beta=1, lambda=0.9)) | |
summary(nlm) | |
## | |
## Formula: Y ~ alpha - beta * lambda^x | |
## | |
## Parameters: | |
## Estimate Std. Error t value Pr(>|t|) | |
## alpha 2.65807 0.06151 43.21 < 2e-16 *** | |
## beta 0.96352 0.06968 13.83 6.3e-13 *** | |
## lambda 0.87146 0.02460 35.42 < 2e-16 *** | |
## --- | |
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 | |
## | |
## Residual standard error: 0.09525 on 24 degrees of freedom | |
## | |
## Number of iterations to convergence: 6 | |
## Achieved convergence tolerance: 3.574e-06 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment