Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
消除dicekriging中的常数趋势_R - Fatal编程技术网

消除dicekriging中的常数趋势

消除dicekriging中的常数趋势,r,R,我想通过在公式inpu中加入“-1”来消除恒定趋势 design = sin(rnorm(5)) obs = rnorm(5) model <- km(formula = ~ -1 + sin(x), design = data.frame(x = design), response = obs, covtype = "gauss") model # shows the model 恒定趋势仍然存在(由截距估计显示)。有什么方法可以消除双克里格法的趋势吗 非常感

我想通过在公式inpu中加入“-1”来消除恒定趋势

design = sin(rnorm(5))
obs = rnorm(5)
model <- km(formula = ~ -1 + sin(x), design = data.frame(x = design),
            response = obs, covtype = "gauss")
model  # shows the model
恒定趋势仍然存在(由截距估计显示)。有什么方法可以消除双克里格法的趋势吗


非常感谢你的帮助

我对DiceKriging有一些经验

修改您的代码,以便

design = sin(rnorm(5))
obs = rnorm(5)
model <- km(formula = NULL, design = data.frame(x = design),
    response = obs, covtype = "gauss")
model  # shows the model
design=sin(形式(5))
obs=rnorm(5)

R中的模型,公式中的-1表示“假设零截距”。不知道是否同样适用于
km
。也许您可以减去该常数,然后添加不带截距的模型?在
km
中设置
coef.trend=0
可能就是您想要的。非常感谢!除了截距,还有其他回归项的公式怎么样?例如:km(公式=~-1+sin(x)…非常感谢!除了截距之外还有其他回归项的公式如何?例如:km(公式=~-1+sin(x)…我尝试了你的建议,但我得到了一个错误:术语错误。默认值(公式,数据=数据):无术语或组件attribute@user3578272我也尝试了上面的方法,得到了同样的错误。
design = sin(rnorm(5))
obs = rnorm(5)
model <- km(formula = NULL, design = data.frame(x = design),
    response = obs, covtype = "gauss")
model  # shows the model