2
我有一個指數模型與打印模型(NLS)特性
mod <- nls(y ~ exp(- (x/a)^b), data = DF, start = list(a = 200, b = 1.4))
,我用繪製計算:
plot(x,y)
lines(sort(DF$x),predict(mod, list(x=sort(DF$x))), lwd=2, col="red")
書面方式mod
我得到:
Nonlinear regression model
model: y ~ exp(-(x/a)^b)
data: DF
a b
211.7098 0.3908
residual sum-of-squares: 17.69
Number of iterations to convergence: 5
Achieved convergence tolerance: 1.477e-07
隨着summary(mod)
,我得到:
Formula: y ~ exp(-(x/a)^b)
Parameters:
Estimate Std. Error t value Pr(>|t|)
a 2.117e+02 2.799e+00 75.64 <2e-16 ***
b 3.908e-01 9.154e-03 42.69 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.08832 on 2268 degrees of freedom
Number of iterations to convergence: 5
Achieved convergence tolerance: 1.477e-07
(8 observations deleted due to missingness)
我的問題是,如果有添加式的方式,參數和剩餘加總平方的情節?我唯一可以想到的方式是使用text()
並複製並粘貼我想要的信息,但我將不得不做很多不同的模型,所以我想自動獲得一些東西。謝謝!
的感謝!完美的作品 – sbg