[R] cross random effects (more information abuot the data)
Spencer Graves
spencer.graves at pdf.com
Thu Aug 5 21:53:17 CEST 2004
Have you read the posting guide
(http://www.R-project.org/posting-guide.html)? Also, can you produce a
simpler example with a few lines of R code that someone could copy from
your email and paste into R to illustrate your problem. I don't have
time to read your email, but if you could reduce it by a factor of about
20, with a toy example that someone else could easily understand, you
might more likely get the answer you are seeking. (You might also find
the answer to your question by following carefully the steps outlined in
the posting guide and trying to produce a toy example as just suggested.)
I'm sorry I can't be of more help. I know how frustrating it can
be to struggle for days with a problem like this.
spencer graves
aleid2001 at yahoo.com wrote:
>Dear friends,
>
>I have asked last few days about cross-random effects
>using PQL, but I have not receive any answer because
>might my question was not clear.
>
>My question was about analysing the salamander mating
>data using PQL. This data contain cross-random effects
>for (male) and for (female). By opining MASS and lme
>library. I wrote this code
>
>sala.glmm <- glmmPQL(fixed=y~WSf*WSM,
>random=list(experiment=pdBlocked(list(pdIdent(~randf-1),pdIdent(~randm-1)))),
>family=binomial, data=sala.data).
>
>Where
>data neame=sala.glmm which contain
> y is response
> wsf is fixed effect
> wsm is fixed effects
> randf is random effect
> random is random effect
>
>The data contain three experiments at the same time.
>The previous cod is work but it does not give me
>accurate result especially for the random effects.
>
>For experiment I wrote this code
>
>experiment <-
>factor(c(rep(1,120),rep(2,120),rep(3,120)))
> because I have three experiments at the same time,
>but if I change the experiment to e.g
>
>experiment <- factor(c(rep(1,360)))
>
>is still give answer but is not the right answer. So,
>I am accusing my specification of the experiment
>(group). If you have any suggestion pleas let me know.
>
> E-mail:aleid2001 at yahoo.com
>
>Here I am going to gve mre details about the data.
>
>the
>
>
>>details about the data is:
>>
>>
>>
>>
> The data are:
>
>
>> McCullagh and Nelder (1989,sec.14.5)polished an
>>interesting set of data on the success of matting
>>between male and female salamanders drawn from two
>>populations, the rough butts (RB) and the white
>>
>>
>sides
>
>
>>(WS), that had been geographically isolated from
>>
>>
>each
>
>
>>other. In the first of three experiments, conducted
>>during the summer of 1986, 10 RB females and 10 WS
>>females were mated with three RB males and three WS
>>males, for a total of six mating each over 24 days.
>>Each of 10 RB males and 10 WS males likewise served
>>
>>
>as
>
>
>>mates for three females of each type. These same 40
>>salamanders were used in a repeat experiment
>>
>>
>conducted
>
>
>>in the fall that involved no repetitions of the
>>earlier mal-female pairs. A third experiment, also
>>conducted in the fall, used a new set of 40 animals.
>>Each experiment involved 30 mating of each of the
>>
>>
>four
>
>
>>gender-population combinations. Simple inspection of
>>the data revealed that three of the crosses had
>>success rates of about 70%, whereas the mating of WS
>>females with RB MALES WAS SUCCESSFUL ONLY 25% OF the
>>time. Evaluating the statistical significance of
>>
>>
>these
>
>
>>differences was complicated by the fact that the 360
>>binary responses were not independent.
>>
>> The model is used here is the mating probabilities
>>are assumed to be the same for each of the three
>>experiments. The random effects are assumed to be
>>independent in each experiment. The male and
>>Female effects are assumed to have different
>>
>>
>variances
>
>
>>but the variances are assumed
>>To be the same across the three experiments.
>>
>> Best Regared
>>
>>
>
>______________________________________________
>R-help at stat.math.ethz.ch mailing list
>https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>
More information about the R-help
mailing list