[R-sig-ME] Cbind and taxa rows trouble in MCMCglmm
Jarrod Hadfield
j.hadfield at ed.ac.uk
Sat Jul 26 14:01:41 CEST 2014
Hi Nick,
For Q1 can you post your model specification?
For Q2 the dimensions of the data-frame and the phylogeny do not have
to be the same. The only condition is that the levels of the column
that you wish to associate with the phylogeny (i.e. Species) are all
represented in either a) the row names of the inverse phylogenetic
covariance matrix (if you use the ginverse= argument) or b) the tip
labels of the phylogeny (if you use the pedigree= argument).
If you do have multiple records per species then you might also want
to consider fitting a non-phylogenetic species effect.
Cheers,
Jarrod.
Quoting Nick Clark <n.clark at griffith.edu.au> on Fri, 25 Jul 2014
19:21:21 +1000:
> Hi all,
>
> I have been trying to run a phylogenetic model using a recently updated
> version of MCMCglmm, but for some reason the model will not run when using
> cbind to form the response variable. I have two variables, one for number
> of individuals uninfected (NoUninf) and one for number infected (NoInf),
> and I have tried both separately to make sure the model works. However,
> when I combine the two using cbind, the model cannot assign the R
> structure, even if I make sure to assign the family using c("gaussian,
> "gaussian") to account for the two variables in the response (error
> repeatedly says r structure not specified properly). I'm not sure if the
> length of the variable is confusing the program, as cbind works perfectly
> well in a glm using lme4.
>
> On a separate note, I'm not sure how to combine rows to make sure that the
> number of records in the data file equals the number of records in the
> phylogeny (1) for each species. Basically, I have a data file with multiple
> rows for each species depending on sampling location, ie:
>
> Species Site NoInf NoUninf
> C. canutus WA 10 25
> C. canutus NA 11 34
>
> Since each line is important as it represents a unique sample location, I
> would like to incorporate them all into the data file. However, my
> phylogeny and covariance matrix will only have one record per species, so
> should I try to shape my data so that each row is a matrix of multiple row
> records? Any help would be greatly appreciated, sorry if these are rather
> mundane problems but I'm quite new to using R.
>
> Thanks,
>
> Nick
>
> --
> Nick Clark
> PhD Candidate, School of Environment
> Griffith University, Gold Coast
>
> Researchgate profile:
> https://www.researchgate.net/profile/Nicholas_Clark4/?ev=hdr_xprf
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the R-sig-mixed-models
mailing list