[R-sig-ME] patch for pedigremm
Joehanes, Roby (NIH/NHLBI) [F]
roby.joehanes at nih.gov
Wed Jul 18 20:08:36 CEST 2012
Yes, you can overwrite my version (if you install them) by reinstalling both
lme4 and pedigreemm from the CRAN website.
I will send you a copy for both lme4 and pedigreemm in a separate e-mail so
that they won't flood the mailing list. Note that they are tested in Linux
only so far.
Installation instruction: Put the two files in your home directory in Linux,
start R in Linux and execute the following lines:
install.packages(c("Rcpp", "RcppEigen", "minqa"));
install.packages("~/lme4-svn-1786b.tar.gz", repo=NULL, type="source");
install.packages("~/pedigreemm-0.2c.tar.gz", repo=NULL, type="source");
Hope this helps,
On 7/17/12 8:05 PM, "David Aguirre-Davies" <d.aguirre at uq.edu.au> wrote:
> Hi Roby,
> Thank you for the reply. Yes the model is exactly as you describe it (i.e.,
> length(unique(dat$id)) == nrow(dat)).
> If I install your versions of lme4 and pedigreemm, and in doing so overwrite
> the existing versions, can I then overwrite your versions (should I need the
> old versions for some reason) by reinstalling lme4 from the cran web site?
> If this is the case, could you please send me your pre-patched versions of
> lme4 and pedigreemm and some instructions on how to get them going?
> Thank again for your help
> David Aguirre
> -----Original Message-----
> From: Joehanes, Roby (NIH/NHLBI) [F] [mailto:roby.joehanes at nih.gov]
> Sent: Wednesday, 18 July 2012 1:09 AM
> To: David Aguirre-Davies
> Cc: r-sig-mixed-models at r-project.org
> Subject: Re: patch for pedigremm
> Hi David:
> I apologize for the late reply.
> The patch is meant to be implemented at the source code, not at R console.
> That is, you need to download the source from the code tracker and retrieve
> the correct revision number. Then, you can apply the patch. You will need to
> patch both your lme4 and your pedigreemm to make it work. I have a pre-patched
> versions, let me know if you want them. Note that if you install my version of
> lme4 and pedigreemm, your version of these packages will be overwritten. Also,
> I only tested them in Linux. I am not aware of whether they would work on
> Windows or Mac.
> What the patch is doing is actually to enable 1 observation per subject, which
> otherwise not available in the regular pedigreemm. In addition, I incorporated
> the latest advances of lme4 as the pedigreemm's back end.
> That being said, if the matrix A you mentioned is the relationship matrix, it
> should always be square regardless of the length of the IDs (or the
> discrepancies thereof). In pedigreemm, the matrix A will be constructed
> automatically from the pedigree (i.e., Ped.0) in a function called
> "relfactor". This same function will subset the matrix A automatically to
> match the IDs that appear in your data. So, there is no need of extra work or
> even my patch for this type of problem (i.e., length(dat$id) != length(id)).
> The way you specified the ID discrepancies (i.e., length(dat$id) = dim(A) &
> length(id) = dim(A)) is a bit unclear to me, and I take it to mean as
> (length(dat$id) != length(id)).
> Looking at the error message that you presented, however, it seems that there
> is one ID per observation (i.e., length(unique(dat$id)) == nrow(dat)). That is
> the use case scenario where you would need my patch.
> Hope this helps,
> On 6/26/12 11:50 PM, "David Aguirre-Davies" <d.aguirre at uq.edu.au> wrote:
> Hi Roby,
> Sorry for my incompetence, but running patches on packages is beyond my R
> knowledge at this stage. I would like to run the following model using
> pedigreemm and I get the error message below,
>> fm1 <-pedigreemm(value.p ~ gen + (1|id), data=dat, pedigree =
> Error in function (fr, FL, start, REML, verbose) :
> Number of levels of a grouping factor for the random effects must be less
> than the number of observations
> I have followed the clues on the web, and I have attempted to implement the
> patch you have provide
> =60&atid=300), but unfortunately I have been unsuccessful.
> So my question is, how can I implement the patch you provide to run an animal
> model where length(dat$id) = dim(A) & length(id) = dim(A)?
> Is there are trick to implementing the patch as cut and paste into the R
> console doesn't seem to work for me.
> Any assistance would be much appreciated.
> David Aguirre
Roby.Joehanes at nih.gov
Building 12A, Room 2007
National Institutes of Health (NIH)
Bethesda, MD 20892
P: (301) 402-8702
F: (301) 480-0028 or (301) 402-2867
More information about the R-sig-mixed-models