Conflicting p-values from pvals.fnc
Hi all, this question is ultimately based on Florian's lecture1 slides here: http://hlplab.wordpress.com/2010/05/10/mini-womm/ I'm doing a mixed model logistic regression, with random intercepts for items and random slopes for items with respect to the fixed effect Indep2 (cf. slide 85): (a) glmer(formula = Dep ~ 1 + (1 | Item) + (0 + Indep2 | Item) + Indep1 + Indep2, data = my.data, family = binomial(link = "logit")) As per slide 88, I can also reduce the random effects to (1 + Indep2 | Item): (b) glmer(formula = Dep ~ 1 + (1 + Indep2 | Item) + Indep1 + Indep2, data = my.data, family = binomial(link = "logit")) It's not exactly clear to me what (1 + Indep2 | Item) does, since the output of both (a) and (b) includes random intercepts for items and random slopes for items by Indep2. At the same time, model (a) and (b) differ in their exact estimates. I would appreciate if someone could explain what the difference between model (a) and (b) is. Thanks Sverre
Dear all, I have a few questions about how to report the results of mixed-effects analyses for publication. I have been perusing the Jaeger & Kuperman presentation but a few questions remain. I have been asked by the reviewers to include a full regression table, which I take to comprise coefficient estimates, MCMC-based confidence intervals and MCMC-based p-value estimations. -Should the model that I use to report these values contain uncentered predictors, centered predictors, or centered and scaled predictors? -A few of my models involve random intercepts, and I believe that pvals.fnc() is not currently defined for models with random intercepts. Do you have any suggestions for how I should report these models? My models contain many control variables and only one or two variables that I am actually concerned with. As such, I have not worried about multicollinearity among the control variables. I suppose I should just state this somewhere to facilitate the interpretation of the regression tables? Lastly, is there any way to do a power analysis for mixed-effects models? One reviewer asked whether this was possible and noted that there may be rough approximations such as "the t-approximation to the coefficient-wise test". Thank you! Ariel
Hi,
Hi, I think part of my concern is Type 1 and Type 2 Errors. From my experience with my own data, Type II error is a big concern, as I've encountered cases where reducing collinearity changes test results from non-significant to highly significant. A tutorial that Dr. Jaeger created on mixed effects model does mention that Type 1 error does not increase much in the presence of collinearity. But if I recall correctly, there is an example in the tutorial using the lexdec dataset where the presence of extremely high collinearity causes an (?)overestimate of significance. So in essence, without being able to reduce collinearity, I am afraid of not being able to detect significances when there are in fact significant differences (or vice versa), and interpreting coefficient estimates is also problematic. Thanks. Best, Xiao
Dear r-lang users,
I have a set of binary data from a 2 by 3 design study. I centered the
two-level predictor ('LHcenter': local & LD) but did not centered the
3 level predictor ('cond': A, B, & C). As you can see below in the
triangular matrix towards the end of the lmer output, there is
significant collinearity; the absolute values of some of the
correlations are above 0.6.
---8<----------------------------------------------------------------------------------------------------------------------------
>glmer(true ~ cond * LHcenter + (1 | subject) + (1 | items), data=offlineTarget, family=binomial)
Generalized linear mixed model fit by the Laplace approximation
Formula: true ~ cond * LHcenter + (1 | subject) + (1 | items)
Data: offlineTarget
AIC BIC logLik deviance
747.8 785.9 -365.9 731.8
Random effects:
Groups Name Variance Std.Dev.
items (Intercept) 0.13838 0.37199
subject (Intercept) 1.44652 1.20271
Number of obs: 864, groups: items, 30; subject, 29
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -0.09775 0.30932 -0.316 0.75199
condB 0.62445 0.25534 2.446 0.01446 *
condC 0.70552 0.27286 2.586 0.00972 **
LHcenter 4.86821 0.42482 11.459 < 2e-16 ***
condB:LHcenter -2.31392 0.51162 -4.523 6.1e-06 ***
condC:LHcenter -1.00381 0.54643 -1.837 0.06621 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) condB condC LHcntr cnB:LH
condB -0.526
condC -0.491 0.607
LHcenter -0.085 0.130 0.118
cndB:LHcntr 0.070 -0.053 -0.093 -0.801
cndC:LHcntr 0.066 -0.093 0.033 -0.735 0.607
---8<----------------------------------------------------------------------------------------------------------------------------
I also tested whether the interaction is significant by comparing the
full model with one without the interaction term:
glmer(true ~ cond * LHcenter + (1 | subject) + (1 | items),
data=offlineTarget, family=binomial)
glmer(true ~ cond + LHcenter + (1 | subject) + (1 | items),
data=offlineTarget, family=binomial)
And I observed a significant difference, suggesting that there is
significant interaction.
So I proceeded to conduct planned comparisons. To do so, I created a
new predictor in the table object by merging the two factors (a 3
level factor and a 2 level factor) together, resulting in a new factor
named 'posthoc_cond' with 6 levels: Local_A, Local_B, Local_C, LD_A,
LD_B, & LD_C
I conducted glmer WITHOUT centering the 6-level fixed predictor 'posthoc_cond'.
posthoc_result = glmer(true~posthoc_cond + (1|subject) + (1|item),
data=offlineTarget, family="binomial")
and then use glht() from 'multcomp' to conduct paired comparisons.
The problem with posthoc_result, again, is high collinearity (see below)
---8<----------------------------------------------------------------------------------------------------------------------------
Correlation of Fixed Effects:
(Intr) pst_A_ p_B_LD pst_B_ p_C_LD
psthc_cndA_ -0.865
psthc_cB_LD -0.835 0.712
psthc_cndB_ -0.944 0.896 0.734
psthc_cC_LD -0.928 0.810 0.779 0.896
psthc_cndC_ -0.891 0.925 0.710 0.914 0.834
---8<----------------------------------------------------------------------------------------------------------------------------
So my question is, in my case, what can be done to reduce
collinearity. It seems that centering those multi-level predictors is
not applicable in my case since I am interested in whether different
levels of the fixed predictors have different means. Centering these
multilevel predictors would not allow me to test that.
Thank you in advance for your help!!
Best,
Xiao
Dear Reinhold,
Thank you very much for your response. Please let me ask two more questions.
I started with the following Full Model.
> priming_Full_Model.lmer<-lmer(RT~cPrimeType*cCondition*cPresOrder+clogLength+cLogPresOrder+(1+cPrimeType*cCondition*cPresOrder+clogLength+cLogPresOrder|Subject)+(1+cPrimeType*cCondition*cPresOrder+clogLength+cLogPresOrder|Item),data=priming)
But the Full Model did not work. I received the following warning message.
Warning message:
In mer_finalize(ans) : iteration limit reached without convergence (9)
In order to examine variances associated with each random effect, I used the following function.
> summary(priming_Full_Model.lmer)
Then, I started removing random effects one by one (I started with the random effect with the "smallest" variance) until the model finally worked in R.
<<Question 1>>
You recommended "(1) Start with a full RE model but without correlation parameters."
How can I carry out this (i.e., "a model without correlation parameters")?
Do I add "corr = FALSE" somewhere in the command line?
<<Question 2>>
You also recommended "(2) Test for which REs you have reliable evidence for between-subject (betweein-item) variance components (drop-1 tests)."
How can I carry out this test? Is there a specific function to carry out this test?
Thank you very much,
Sincerely yours,
Sunfa
Send ling-r-lang-L mailing list submissions to
ling-r-lang-l-xGejAJT2w6xeRyQZnrz35w@public.gmane.org
To subscribe or unsubscribe via the World Wide Web, visit
https://mailman.ucsd.edu/mailman/listinfo/ling-r-lang-l
or, via email, send a message with subject or body 'help' to
ling-r-lang-l-request-xGejAJT2w6xeRyQZnrz35w@public.gmane.org
You can reach the person managing the list at
ling-r-lang-l-owner-xGejAJT2w6xeRyQZnrz35w@public.gmane.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of ling-r-lang-L digest..."
Today's Topics:
1. Re: Figuring out maximum random effects in mixed-effect
regression models (Reinhold Kliegl)
----------------------------------------------------------------------
Message: 1
Date: Sat, 19 Nov 2011 13:01:06 +0100
From: Reinhold Kliegl <kliegl <at> uni-potsdam.de>
Subject: [R-lang] Re: Figuring out maximum random effects in
mixed-effect regression models
To: Reinhold Kliegl <kliegl <at> uni-potsdam.de>
Cc: r-lang-J8UlxMCpGvdVdeU8dOWy+g@public.gmane.org, sunfakim-LjRBWs/Th6SVc3sceRu5cw@public.gmane.org, Sunfa Kim
<sunfakim-Re5JQEeQqe8@public.gmane.orgm>
Message-ID: <96042652-0391-4085-BB59-1BD1451AA641-KiJTPfjSHVUubQSw3dWLiw@public.gmane.org>
Content-Type: text/plain; charset="us-ascii"
Sorry for the typos ...
in (4): "if you have NO evidence ..."
In (5): "Test whether (4) fits significantly better than (3)."
I add:
(6) If you have specific hypotheses about correlation parameters, you may be able to test just those correlation parameters and keep the rest at zero.
All tests are LRTs--with their own problems, but usually not so severe with our kind of data, I think. Finally, note that correlation parameters are linked to the design (or model) matrix. They depend on what you pick as the intercept; they are NOT invariant to transformations of covariates, linear or non-linear.
Reinhold Kliegl
----
Reinhold Kliegl
http://read.psych.uni-potsdam.de
http://www.dlexdb.de/
On 19.11.2011, at 12:34, Reinhold Kliegl wrote:
> I would recommend a slightly different approach.
>
> (1) Start with a full RE model but without correlation parameters.
> (2) Test for which REs you have reliable evidence for between-subject (betweein-item) variance components (drop-1 tests)
> (3) Remove the non-significant variance components
> (4) Estimate the correlation parameters only for the remaining model. (It does not make much sense to me to estimate a correlation parameter if you have evidence for reliable variance for one of the contributing components.)
> (5) Test whether (4) is significantly better than (4). It is actually not trivial to estimate reliable correlation parameters in our usual psycholinguistic or psychological expertiments.
>
> Reinhold Kliegl
>
> On 19.11.2011, at 12:14, Sunfa Kim wrote:
>
>> To whom it may concern:
>>
>> I would like to use a mixed-effect regression approach to examine the adaptation effect (i.e., learning) during sentence comprehension.
>>
>> Right now, I am trying to figure out the maximum random effects.
>>
>> One of the models produced the following summary
>> >summary(priming.lmer)
>>
>> Random effects:
>>
>> Groups
>>
>> Name
>>
>> Variance
>>
>> Std.Dev.
>>
>> Corr
>>
>> Subject
>>
>> (Intercept)
>>
>> 19867.54
>>
>> 140.952
>>
>>
>>
>> cPrimeType
>>
>> 367.20
>>
>> 19.162
>>
>> -1.000
>>
>>
>> cCondition
>>
>> 5558.49
>>
>> 74.555
>>
>> -1.000
>>
>>
>> clogLength
>>
>> 8128.49
>>
>> 90.158
>>
>> 0.954
>>
>>
>> cLogPresOrder
>>
>> 3033.62
>>
>> 55.078
>>
>> -0.216
>>
>>
>> cPrimeType:cCondition
>>
>> 17606.58
>>
>> 132.690
>>
>> 0.164
>>
>>
>> cPrimeType:cCondition:cPresOrder
>>
>> 351.92
>>
>> 18.759
>>
>> 0.142
>>
>> Item
>>
>> (Intercept)
>>
>> 2870.65
>>
>> 53.578
>>
>>
>>
>> cCondition
>>
>> 3391.10
>>
>> 58.233
>>
>> 0.668
>>
>>
>> cCondition:cPrimeType
>>
>> 1224.53
>>
>> 34.993
>>
>> -0.652
>>
>> Residual
>>
>>
>> 31654.56
>>
>> 177.917
>>
>>
>>
>>
>> Baayen, Davidson, and Bates (2008) noted that "the high correlation of the intercept and slope for the subject random effects (-1.00) indicates that the model has been overparameterized" (p. 395).
>>
>> So, I inspected the correlations and identified three high correlations from the table. Therefore, I simplified the model by removing the by-subject adjustments to the slopes of cPrimeType, cCondition, and clogLength.
>>
>> The simplified model produced the following summary.
>> >summary(rev_priming.lmer)
>>
>> Random effects:
>>
>> Groups
>>
>> Name
>>
>> Variance
>>
>> Std.Dev.
>>
>> Corr
>>
>> Subject
>>
>> (Intercept)
>>
>> 19443.07
>>
>> 139.438
>>
>>
>>
>> cLogPresOrder
>>
>> 2832.97
>>
>> 53.226
>>
>> -0.341
>>
>>
>> cPrimeType:cCondition
>>
>> 1043.35
>>
>> 32.301
>>
>> -0.133
>>
>>
>> cPrimeType:cCondition:cPresOrder
>>
>> 204.57
>>
>> 14.303
>>
>> 0.364
>>
>> Item
>>
>> (Intercept)
>>
>> 2935.82
>>
>> 54.183
>>
>>
>>
>> cCondition
>>
>> 3545.04
>>
>> 59.540
>>
>> 0.740
>>
>>
>> cCondition:cPrimeType
>>
>> 1878.62
>>
>> 43.343
>>
>> -0.656
>>
>> Residual
>>
>>
>> 36990.34
>>
>> 192.329
>>
>>
>>
>> Now, the correlation values seem to be in the range of acceptable values (i.e., not too high).
>>
>> Finally, in order to verify that the simpler model is justified, I carried out a likelihood ratio test.
>>
>> > anova(priming.lmer, rev_priming.lmer)
>>
>> Df
>>
>> AIC
>>
>> BIC
>>
>> logLik
>>
>> Chisq Chi
>>
>> Df
>>
>> Pr(>Chisq)
>>
>> riming.lmer
>>
>> 27
>>
>> 22598
>>
>> 22744
>>
>> -11272
>>
>>
>>
>>
>> rev_priming.lmer
>>
>> 45
>>
>> 22474
>>
>> 22718
>>
>> -11192
>>
>> 159.35
>>
>> 18
>>
>> < 2.2e-16 ***
>>
>> ---
>> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>>
>> My understanding is that this likelihood ratio test indicates that the removal of the by-subject adjustments to the slopes is NOT justified.
>>
>> My question is which model should I choose to report my results? priming.lmer or rev_priming.lmer?
>>
>> Thank you very much for your suggestions on this matter in advance!
>>
>> Best,
>> Sunfa
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucsd.edu/pipermail/ling-r-lang-l/attachments/20111119/f0bc13f6/attachment.html
------------------------------
_______________________________________________
ling-r-lang-L mailing list
ling-r-lang-L-xGejAJT2w6xdhJFDKQKK8Q@public.gmane.orgd.edu
https://mailman.ucsd.edu/mailman/listinfo/ling-r-lang-l
End of ling-r-lang-L Digest, Vol 2, Issue 49
********************************************
To whom it may concern:
I would like to use a mixed-effect regression approach to examine the adaptation effect (i.e., learning) during sentence comprehension.
Right now, I am trying to figure out the maximum random effects.
One of the models produced the following summary
>summary(priming.lmer)
Random effects:
|
Groups |
Name |
Variance |
Std.Dev. |
Corr |
|
Subject |
(Intercept) |
19867.54 |
140.952 |
|
|
|
cPrimeType |
367.20 |
19.162 |
-1.000 |
|
|
cCondition |
5558.49 |
74.555 |
-1.000 |
|
|
clogLength |
8128.49 |
90.158 |
0.954 |
|
|
cLogPresOrder |
3033.62 |
55.078 |
-0.216 |
|
|
cPrimeType:cCondition |
17606.58 |
132.690 |
0.164 |
|
|
cPrimeType:cCondition:cPresOrder |
351.92 |
18.759 |
0.142 |
|
Item |
(Intercept) |
2870.65 |
53.578 |
|
|
|
cCondition |
3391.10 |
58.233 |
0.668 |
|
|
cCondition:cPrimeType |
1224.53 |
34.993 |
-0.652 |
|
Residual |
|
31654.56 |
177.917 |
|
Random effects:
|
Groups |
Name |
Variance |
Std.Dev. |
Corr |
|
Subject |
(Intercept) |
19443.07 |
139.438 |
|
|
|
cLogPresOrder |
2832.97 |
53.226 |
-0.341 |
|
|
cPrimeType:cCondition |
1043.35 |
32.301 |
-0.133 |
|
|
cPrimeType:cCondition:cPresOrder |
204.57 |
14.303 |
0.364 |
|
Item |
(Intercept) |
2935.82 |
54.183 |
|
|
|
cCondition |
3545.04 |
59.540 |
0.740 |
|
|
cCondition:cPrimeType |
1878.62 |
43.343 |
-0.656 |
|
Residual |
|
36990.34 |
192.329 |
|
Now, the correlation values seem to be in the range of acceptable values (i.e., not too high).
|
|
Df |
AIC |
BIC |
logLik |
Chisq Chi |
Df |
Pr(>Chisq) |
|
riming.lmer |
27 |
22598 |
22744 |
-11272 |
|
|
|
|
rev_priming.lmer |
45 |
22474 |
22718 |
-11192 |
159.35 |
18 |
< 2.2e-16 *** |
Hello everyone,
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
RSS Feed13 | |
|---|---|
5 | |
9 | |
17 | |
10 | |
7 | |
15 | |
28 | |
1 | |
12 | |
1 | |
31 | |
30 | |
4 | |
54 | |
14 | |
9 | |
11 | |
35 | |
12 | |
7 | |
5 | |
9 | |
2 | |
7 | |
3 | |
9 | |
2 | |
9 | |
25 | |
2 | |
7 | |
2 | |
7 | |
2 | |
6 | |
6 | |
2 | |
1 | |
8 | |
5 | |
2 | |
3 | |
5 | |
5 | |
4 | |
12 | |
8 | |
6 | |
14 | |
25 |