[R] BLUP with missing data
Marcio Resende
mresendeufv at yahoo.com.br
Wed Sep 23 03:05:05 CEST 2009
Sorry, I sent it quickly and forgot to thank in advance
Marcio
Marcio Resende wrote:
>
> hello guys, I need to do a BLUP in the simplest model
> y = Xm + Zg + e
> however I have missing data in the analysis which I can´t consider as
> 0(zero). So I need to generate the matrix X'Z, Z'X and Z'Z step by step; I
> can´t use
> crossprod(x) #neither
> X'X <- t(x)%*%x
>
> because I should skip the elements with missing data in the matrix
>
> I´ll try to be more clear,
> supposing
> a matrix x and a z
> dim (t(x)) = 2275 788
> dim (z) = 788 1
>
> but I have in my matrix the effect 0(zero) which is not missing, therefore
> I can´t just replace the missing values by 0(zero) and i can´t just remove
> it from the matrix because it would unbalance it
>
> A way to do it could be generate Z'X step by step e.g
> Z'X [1, 1] is equal the sum of the product between the elements in the
> first collumn of X and the first collumn of Z skipping the elements
> whenever there is a missing data
>
> However I can´t do this in R
>
> Does anybody know how to do it this way or an easier way to do it?
>
--
View this message in context: http://www.nabble.com/BLUP-with-missing-data-tp25530949p25530951.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list