[R-sig-ME] lmekin complains about dimnames

Joshua Wiley jwiley.psych at gmail.com
Fri May 18 03:00:11 CEST 2012


Hi All,

I am trying to estimate disease heritability ultimately, but to get
started, I wanted to model a continuous outcome using lmekin().  I
tried something very similar (I think) to example 3 (GAW) of the
lmekin vignette from the coxme package
http://cran.r-project.org/web/packages/coxme/vignettes/lmekin.pdf

However, I get an error about the variance matrix not having dimnames.
 Although there does not seem to be data provided with the vignette, I
believe I should be essentially perfectly replicating the steps.  Any
ideas on what to do?  Below is made up data and an example along with
my session info.

Thanks!

Josh

################################################
require(kinship2)
adat <- data.frame(PersonID = 1:12,
  FatherID = c(NA, NA, NA, 1, 1, 1, 1, 4, 4, 4, 4, 4),
  MotherID = c(NA, NA, NA, 2, 2, 2, 2, 3, 3, 3, 3, 3),
  sex      = c(0,  1,  1,  0, 0, 1, 1, 0, 0, 0, 1, 1))
adat <- do.call("rbind", rep(list(adat), 100))
adat$FamilyID <- rep(1:100, each = 12)
set.seed(10)
adat$Outcome <- rnorm(nrow(adat), mean = adat$sex + rep(rnorm(100), each = 12))
gadat <- with(adat, pedigree(PersonID, FatherID, MotherID, sex, famid
= FamilyID))
## plot family structure (identical for all)
plot(gadat[1])
kamat <- kinship(gadat)
require(coxme)
(gfit1 <- lmekin(Outcome ~ factor(sex) + (1 | FamilyID), data=adat,
varlist=kamat))
# Error in bdsmatrix.reconcile(varlist, bname) :
#  No dimnames found on a variance matrix


Here is my sessionInfo():

R Under development (unstable) (2012-05-08 r59331)
Platform: x86_64-pc-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] splines   stats     graphics  grDevices utils     datasets  methods
[8] base

other attached packages:
[1] coxme_2.2-2      nlme_3.1-103     bdsmatrix_1.3    survival_2.36-14
[5] kinship2_1.3.3   quadprog_1.5-4   Matrix_1.0-6     lattice_0.20-6

loaded via a namespace (and not attached):
[1] compiler_2.16.0 grid_2.16.0     tools_2.16.0



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
Programmer Analyst II, Statistical Consulting Group
University of California, Los Angeles
https://joshuawiley.com/



More information about the R-sig-mixed-models mailing list