【发布时间】:2015-01-07 00:49:30
【问题描述】:
我正在使用nls2 包来进行调整。拟合是正确的,但我如何只取回预测变量的计算值?
公式:
fit <- nls2(Trans ~ t - (h * W ^ 2 / ((WLn - x0) ^ 2 + W ^ 2)),
data = siteData,
start = list(t=0.6, h=0.5, x0=830, W=100),
algorithm = "port",
#trace = TRUE,
lower = c(t=-Inf, h=0, x0=700, W=35),
upper = c(t=0.6, h=Inf, x0=950, W=Inf)
)
fit
即我怎样才能只取回 t、h、x0 和 W 的值?谢谢!
【问题讨论】:
-
至于这个问题:提供我们可以使用的示例数据以便有一些东西可以使用。还要始终提及您正在使用的包的名称(即使包的名称与函数的名称一致)。这么说是为了您可以得到更多问题的答案:)
标签: r statistics nls non-linear-regression