This gen is different varieties of plant, so each can be repeatedly grown and yield is measured. The covariance matrix is relatedness measure by genetic similarity calculated by ibd probabilities in seperate experiments.

Aaron, thank you for your thoughts, hope will get more robust suggestion on this ...
–
Ram SharmaNov 18 '11 at 10:46

The example is extremely confusing because it strongly suggests a different kind of dataset altogether; it contradicts the question. Please either delete this example or provide a realistic one.
–
whuber♦Nov 18 '11 at 17:21

@whuber I edited some of my typo and made my point clearer, hope helps
–
Ram SharmaNov 18 '11 at 19:05

@RamSharma: I took the liberty to make a sample positive definite covariance matrix, and made a few minor edits; feel free to edit back if I've changed something important.
–
AaronNov 23 '11 at 3:43

I think we should migrate this to stackoverflow, to get more views. I do not how to do it, can somebody help ?
–
John Nov 23 '11 at 12:04

For non-normal responses, you'd need to modify the pedigreemm package, which is based on lme4. It gets you close, but the relationship matrix has to be created from a pedigree. The below function is a modification of the pedigreemm function which takes an arbitrary relationship matrix instead.

This doesn't apply here as you have ten observations/individual, but for one observation/individual you need one more line in this function and a minor patch to lme4 to allow for only one observation per random effect.

How about: lme(yld ~ 1, data = mydata, random = ~ gen + repl, correlation = covmat)# the formula is giving and error and I am not sure that if the correlation structure applies to replication or residual term, what do you think ?
–
John Nov 18 '11 at 11:17

@John: Crossed random effects are tricky with nlme and something more complicated is needed that gen + repl; also, I think the correlation needs to call one of nlme's covariance/correlations functions with covmat as a parameter. The notation for this is really tricky so to say more I'd need Pinhiero/Bates on hand, which I don't today.
–
AaronNov 18 '11 at 15:38

The right notation would be probably be something like lme(yld ~ 1, data = mydata, random = ~ 1 | gen, correlation = corSymm(value=covmatX, form= ~ gen, fixed=TRUE)), where covmatX is a modified version of covmat to make it however corSymm wants it. I'm not quite sure the form term is right either.
–
AaronNov 23 '11 at 3:41

@Aaron, do have this patch handy? I would need it often to fit a model with single individual for each class...I might want to ask as seperate question ....it might be too much in this question
–
Ram SharmaNov 23 '11 at 14:51

This answer is potential expansion of the suggestion made by Aaron, who has suggested to use Pedigreem. The pedigreem can compute relationship from the projects as following syntax, I am unaware how we can use such relation output from different way.