我一直在处理这些数据
year rango_edad Sexo zona_2016 conteo siniestros expuestos upc_millon valor_millon freq
1 2010 01. < 1 F Alejada 180 87 75 121 111 0.48
2 2010 01. < 1 F Ciudades 103453 76219 40228 60755 84981 0.74
3 2010 01. < 1 F Especial 5129 3194 2078 3289 3013 0.62
4 2010 01. < 1 F Normal 27393 18436 10735 15656 16692 0.67
5 2010 01. < 1 M Alejada 185 98 73 116 110 0.53
6 2010 01. < 1 M Ciudades 106915 80731 41719 62991 105135 0.76
costo.medio ratio
1 1.27 0.92
2 1.11 1.40
3 0.94 0.92
4 0.91 1.07
5 1.12 0.94
6 1.30 1.67
我正在尝试用 gamlss 对频率进行建模
gamlss(freq~Sexo+zona_2016+rango_edad,family=PO(mu.link = "log"),data=na.omit(subset(datos,is.na(freq)==FALSE )))
gamlss(freq~Sexo+zona_2016+rango_edad,family=NBI(mu.link = "log"),data=na.omit(subset(datos,is.na(freq)==FALSE )))
但我收到了这个错误信息
Error in while (abs(G.dev.old - G.dev) > c.crit && iter < n.cyc) { : missing value where TRUE/FALSE needed
我该如何解决?