[R-sig-ME] (no subject)

Akanksha Singh akanksha.s1988 at gmail.com
Tue Jun 16 15:46:07 CEST 2015


Sir,
I have used lme4 package to apply mixed model as follows.

lmer(LL ~ TMT +(1|FamID), data=fp1) -> lm

>From this I used lsmeans to extract the mean of each treatment and then
used it to define a function as follows:

myfcn = function(lm) {
lsm = predict(lsmeans(lm, c("TMT")))
apply(matrix(lsm, ncol = 2),  1,
function(x) diff(range(x)) / max(x) )
}

And then used the bootmer method to find the confidence interval of this
function as follows:

LL.boot <- bootMer(lm, myfcn, nsim=999, use.u=F, type="parametric")
boot.ci(LL.boot, index=1, type=c("norm", "basic", "perc"))

I have done this for three different data using the same procedure.
So my problem is that now I want to find out bootstrapped correlation and
its confidence interval using these three values of three dataset of the
function together. I know bootstrap cannot be done with three values, if I
store the values in a variable and then use it. So is there any method so I
can apply the bootstrap correlation on these three functions of three data
sets together. Sir I am very new to R and don't know about any programming
tricks. I will be highly greatful to you if you could help me out.

-- 
Thanks
Akanksha Singh

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list