我想计算线性分位数混合模型,但我总是得到以下错误
Error in f(arg, ...) : NA/NaN/Inf in foreign function call (arg 1)
要重现,请下载数据集并导入:
https://dl.dropboxusercontent.com/u/79415744/mixedModelDataSet.txt
stackoverflow <- read.table("mixedModelDataSet.txt", sep="\t", header = TRUE ) # import
然后尝试计算模型:
require("lqmm")
stack15 <- lqmm(gsDeviationMio ~ aoi, random = ~ 1, group = vpName, data = stackoverflow, tau = 0.15)
我做错了什么?
计算非分位数混合模型的工作原理:
stackLme <- lme(gsDeviationMio ~ aoi, random = ~ 1|vpName, data = stackoverflow)
非常感谢你的帮助!
最佳, 弗洛里安
答案 0 :(得分:1)
以下是Marco Geraci(lqmm的作者)
的答案响应的规模存在问题。此外,'gs'算法似乎与此数据集有一些问题。请尝试以下
stackoverflow$y <- scale(stackoverflow$gsDeviationMio, center = T, scale = T)
lqmm(y ~ aoi, random = ~ 1, group = vpName, data = stackoverflow, tau = 0.15, control = lqmmControl(method = "df", UP_max_iter = 200))