我在模拟数据的lme
函数上运行多元线性混合效应模型:
lme(value ~-1 + cs_d0 + va_d0 + as.numeric(times):cs_d0 + as.numeric(times):va_d0 ,
random = ~ -1 + (cs_d0 + va_d0) + as.numeric(times):va_d0 + as.numeric(times):cs_d0 |id,
weights=varIdent(form=~1| cs_d0),corr=corCompSymm(form=~1 | id),
control=lmeControl(returnObject=TRUE,singular.ok=TRUE, opt="optim"), data =D0Train)
只是为了清除一些变量: cs_d0和va_d0是虚拟变量。 我使用融合函数来组合数据集 值的值为cs_d0和va_d0。
我面临的问题是:
Warning messages:
1: In logLik.reStruct(object, conLin) :
Singular precision matrix in level -1, block 1
2: In logLik.reStruct(object, conLin) :
Singular precision matrix in level -1, block 1
我不知道这条警告信息的含义是什么意思! 另外,我认为结果不合理
Linear mixed-effects model fit by REML
Data: D0Train
Log-restricted-likelihood: -7255.602
Fixed: value ~ -1 + cs_d0 + va_d0 + as.numeric(times):cs_d0 + as.numeric(times):va_d0
cs_d0 va_d0 cs_d0:as.numeric(times)
29.7567029 29.7567029 0.6767829
va_d0:as.numeric(times)
0.6767829
Random effects:
Formula: ~-1 + (cs_d0 + va_d0) + as.numeric(times):va_d0 + as.numeric(times):cs_d0 | id
Structure: General positive-definite, Log-Cholesky parametrization
StdDev Corr
cs_d0 1.623495e-02 cs_d0 va_d0 v_0:.(
va_d0 2.790607e-03 0.006
va_d0:as.numeric(times) 1.298373e-03 0.001 -0.007
cs_d0:as.numeric(times) 1.679235e-04 -0.001 0.000 0.000
Residual 1.093950e+01
Correlation Structure: Compound symmetry
Formula: ~1 | id
Parameter estimate(s):
Rho
-0.05660665
Variance function:
Structure: Different standard deviations per stratum
Formula: ~1 | cs_d0
Parameter estimates:
1 0
1.000000 1.000006
Number of Observations: 1920
Number of Groups: 120
所以,在固定效果中:cs_d0和va_do的截距相同也是slops有相同的输出!!! 我在这里问,是否有人可以帮助我,拜托?