全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
7637 7
2012-02-11
诸位高手:

俺遇到一个头疼的问题。有一个函数y=f(x; a, b, c),其中y是因变量,x是自变量,a、b、c是待拟合参数。
因为这个模型的形式十分复杂,所以我没有使用nlim函数去拟合。假设我选取的a、b、c参数的初始值合适(即初始值能够产生可以合理的拟合值),有一组实验得到的数据,使用f(x; a, b, c)去拟合。具体过程是使用最优化函数optim,看Chi-Square是否最小,Chi-Square就是设定的收敛指标。

具体举出一个logistic模型(y=c/(1+exp(a-b*x)))的例子(尽管这个模型可以使用其它软件比如matlab来拟合)的拟合:
x <- c(15.2, 18.2, 23, 25.5, 29.1)
D <- c(39.2, 20.4, 10.6, 7.6, 6.4)
y <- 1/D
# convergence function
  Control <- function(q){
    c        <- q[1]
    a        <- q[2]
    b        <- q[3]
    expected <- c/(1+exp(a-b*x))
    # to calculate Chi-square
    abs(sum((y-expected)^2/expected))
  }

# optimization
Result <- optim(c(0.19, 0.01, 0.2), Control)

# To obtain the fitted model parameters, namely goalc, goala, goalb.
goalc  <- Result$par[1]
goala  <- Result$par[2]
goalb  <- Result$par[3]

其中a的初值为0.01,b的初值为0.2,c的初值为0.19。这些初值的设定都是执行optim所必须的。

随后写了篇稿子投到美国,结果审稿人提出了如下的疑问,我不知道是什么意思,也不知道如何回答,请多赐教。

Let me state my question once again: “Why and how the model fitting renders a chi-square (χ2) value (in particular, when the algorithms (SSI-P and OptimSSI-P) were taken)?” By this, I mean: when a random variable (X) is distributed as a standard normal distribution, then we know that X2 has a χ2 distribution with 1 degree of freedom (df). The sum of several independent χ2 distribution is still a chi-square with its df equals to the sum of individual dfs of each χ2-variates. Statistical (regression) models with summary χ2-test or χ2-criterion are based on this property even a large-sample approximation is used. This is so crucial that, without validating the chi-square framework, all subsequent inferences are not reliable. The authors should explain why your model produces χ2-values.

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-2-11 10:33:44
就是要你说明为什么你的模型的结果服从卡方分布。
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-2-11 10:35:20
qoiqpwqr 发表于 2012-2-11 10:33
就是要你说明为什么你的模型的结果服从卡方分布。
模型结果是什么意思?
是指残差平方和吗?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-2-11 10:59:27
你为什么要求最小的sum((y-expected)^2/expected)?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-2-11 11:05:12
qoiqpwqr 发表于 2012-2-11 10:33
就是要你说明为什么你的模型的结果服从卡方分布。
那位reviewer的意思是不是让我们检查一下,如果使用f(x; a,b,c)模型去拟合实验的数据,得到的残差究竟符不符合正态分布?

我猜想他的意思就是在说,残差符合正态分布,在各个残差的平方就符合卡方分布?若果能通过正态性检验证实残差符合正态分布,那么他的问题就得到回答了。是不是这个意思?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-2-11 11:08:43
但是你的残差不是独立的
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群