无法加载gamlss.mx包

时间:2013-04-28 04:41:11

标签: r poisson

我正在研究构建具有泊松分布误差的广义线性混合效应模型。我在lme4包中使用了glmer()来处理它,但意识到我的模型非常过分,我需要采用负二项回归路径。根据本教程(非常有用):

http://depts.washington.edu/cshrb/newweb/stats%20documents/Longitudinal%20count%20regression%20REVISION2%20FINAL%20(15%20June%202012).pdf

根据本教程,我可以使用2个包来做负二项GLMM:gamlss.mx和glmmADMB问题是,我甚至无法加载包。对于gamlss.mx,我似乎能够安装它,但它不会加载。 R说包装不存在(或者不是我说的那个?)。它的命名可能会有一些问题(它被称为gamlss.mx,但R似乎试图加载gamlss但没有找到它?)。

> utils:::menuInstallPkgs()
--- Please select a CRAN mirror for use in this session ---
Warning: dependency ‘gamlss’ is not available
trying URL 'http://probability.ca/cran/bin/windows/contrib/2.12/gamlss.mx_4.0-4.zip'
Content type 'application/zip' length 53000 bytes (51 Kb)
opened URL
downloaded 51 Kb

package 'gamlss.mx' successfully unpacked and MD5 sums checked

The downloaded packages are in
        C:\Users\Mata\AppData\Local\Temp\Rtmp6SfELM\downloaded_packages
> local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE)
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
Loading required package: gamlss
Error: package 'gamlss' could not be loaded
In addition: Warning messages:
1: package 'gamlss.mx' was built under R version 2.12.2 
2: In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc) :
  there is no package called 'gamlss'

1 个答案:

答案 0 :(得分:0)

gamlss-mx软件包看起来依赖于gamlss软件包,它不是安装在你的机器上的。安装它可以解决这个问题