From: Maya Joshi <maya.d.joshi_at_gmail.com>

Date: Sun, 17 Apr 2011 21:59:00 -0400

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 18 Apr 2011 - 05:07:58 GMT

Date: Sun, 17 Apr 2011 21:59:00 -0400

I need your help: Execuse me for my limited R knowledge.

#example data set

set.seed (134)

lm=c(1:4)

gen <- c(rep(1, 4), rep(2, 4), rep(3, 4), rep(4, 4),rep(5, 4),rep(6, 4))

X2 = X1 + rnorm(length(X1), 0,3)

X <- c(rep( 1, length(X1)), rep( 2, length(X2))) # dummy x variable

dataf <- data.frame(as.factor(block), as.factor(gen), as.factor(X), yvar )

Question 1: I got the following error

fm2Gen <- lme(yvar ~ X + gen, random= ~ 1|block, data= dataf)

Question 2: How can get I covariance matrix between X1 and X2 either using lme4 or lmer.

Should I put gen in the model to do this? Should I specify something in "* correlation* = "

[[alternative HTML version deleted]]

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 18 Apr 2011 - 05:07:58 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Mon 18 Apr 2011 - 10:40:31 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*