小编Jua*_*llo的帖子

为什么我在逻辑回归中收到“权重错误 * y:二元运算符的非数字参数”?

我愿意对我的数据集执行逻辑回归。我用:

glm.fit=glm(direccion~Profit, data=datos, family=binomial)

    Minute  ecopet  TASA10  direccion   Minute  cl1     Day         Profit  
1   571     2160     5       1          571    51.85    2015-02-20  -0.03   
2   572     2160     5       1          572    51.92    2015-02-20   0.04   
3   573     2160     5       1          573    51.84    2015-02-20  -0.04   
4   574     2160     5       1          574    51.77    2015-02-20  -0.11   
5   575     2160     10      1          575    51.69    2015-02-20  -0.19   
6   576     2165     5       1          576    51.69    2015-02-20  -0.16   
7   577     2165    -5       0          577    51.64    2015-02-20  -0.28   
8   578     2165    -10      0 …
Run Code Online (Sandbox Code Playgroud)

r logistic-regression

1
推荐指数
1
解决办法
3万
查看次数

为什么我的For循环跳过步骤?[R

我的For循环似乎是跳过它应该一步一步的步骤.

简化我的代码:

for(j in 1:5){
  ventana <- spread_real[j + 1: 180 + j]
}
Run Code Online (Sandbox Code Playgroud)

它从矢量'spread_real'获取子集[j + 1:180 + j]并将其分配给变量'ventana'.

但是一旦我运行代码并且j等于5,那么ventana将获得子集spread_real [9:190]

任何帮助都会非常感激,因为我已经坚持了很长时间了.

r algorithmic-trading

0
推荐指数
1
解决办法
84
查看次数