Can no longer return beta coefficients using MuMIn package in R -
when using r package mumin (v1.9.5), , command dredge, beta = true switch no longer functions expected.
# load cement data set mumin package data(cement) # build global model fmd <- lm(y ~ x1 + x2 + x3 + x4, data = cement) # dredge global model without returning standardized coefficients (default); # working ms1 <- dredge(fmd) # dredge global model , return standardized coefficients; # not working ms1 <- dredge(fmd, beta = true) the latter returns:
error in dimnames(ret) <- list(names(model$coefficients), c("estimate", : length of 'dimnames' [1] not equal array extent using r v3.0.0
confirmed mumin 1.9.5 ... looks there bug in beta.weights() function.
the fourth line,
coefmat <- coeftable(model)[, 1l:2l] should be
coefmat <- coeftable(model)[, 1l:2l, drop=false] you can fix yourself, temporarily, follows:
fix(beta.weights) ## opens editor; make change in editor , save/exit assigninnamespace("beta.weights",beta.weights,"mumin") however, idea contact package maintainer (see help(package="mumin") , submit bug report ...
Comments
Post a Comment