## #StackBounty: #mixed-model #t-test #f-test linear mixed models – difference between t-tests and F-tests

### Bounty: 50

While helping someone else with their analyses, I’ve run into a question regarding the difference between t-tests and F-tests for linear mixed models in lme4 for R, as provided by lmerMod. I’m aware of the problems with calculating any kind of p-values for linear mixed models (as I understand, primarily due to the fact that definition of the degrees of freedom is problematic), as well as the problems with interpreting main effects in the presence of significant interactions (based on the marginality principle).

Briefly, the data are from an experiment with two conditions (congruity TRUE/FALSE), measured on six sets of sensors which can be described as a combination of two factors: anteriority (anterior/posterior) and laterality (left/central/right).

As can be seen from the summary output below, the t.tests do not show a significant congruity effect (p = 0.12), while the anova output shows a very significant congruity effect (p = 2.8e-10). Since congruity has only two levels, this cannot be the result of the F-test doing an omnibus test over several levels of the fixed factor. I am therefore unsure what causes the very significant result in the anova output. Is this due to the fact that there are strong interactions involving congruity which of course depend on the inclusion of the main effect in the model parametrization?

I have looked for a previous answer to this question on CrossValidated but I have not been able to find anything relevant except possibly the first answer to this question. However, if that does provide a real answer then it is implicit in the mathematics, and I am looking for a conceptual answer that I can explain to the person I am trying to help.

``````> final.mod<-lmer(uV~1+factor(congruity)*factor(laterality)*factor(anteriority)+(1|sent.id)+(1|Subject),data=selected.data)
> summary(final.mod)
Linear mixed model fit by REML

t-tests use  Satterthwaite approximations to degrees of freedom ['lmerMod']
Formula: uV ~ 1 + factor(congruity) * factor(laterality) * factor(anteriority) +      (1 | sent.id) + (1 | Subject)
Data: selected.data
REML criterion at convergence: 348903.5
Scaled residuals:
Min      1Q  Median      3Q     Max
-7.0440 -0.6002  0.0069  0.6038 11.3912
Random effects:
Groups   Name        Variance Std.Dev.
sent.id  (Intercept)   1.773   1.332
Subject  (Intercept)   2.548   1.596
Residual             111.396  10.554
Number of obs: 46176, groups:  sent.id, 41; Subject, 30
Fixed effects:
Estimate Std. Error         df t value Pr(>|t|)
(Intercept)                                                                 4.768e-03  3.973e-01  7.900e+01   0.012   0.9905
factor(congruity)TRUE                                                       3.758e-01  2.410e-01  4.611e+04   1.559   0.1189
factor(laterality)left                                                      7.154e-02  2.430e-01  4.610e+04   0.294   0.7685
factor(laterality)right                                                    -2.003e-01  2.430e-01  4.610e+04  -0.824   0.4098
factor(anteriority)posterior                                               -4.203e-02  2.430e-01  4.610e+04  -0.173   0.8627
factor(congruity)TRUE:factor(laterality)left                               -1.013e-01  3.404e-01  4.610e+04  -0.298   0.7660
factor(congruity)TRUE:factor(laterality)right                               7.233e-02  3.404e-01  4.610e+04   0.213   0.8317
factor(congruity)TRUE:factor(anteriority)posterior                          6.162e-01  3.404e-01  4.610e+04   1.810   0.0702 .
factor(laterality)left:factor(anteriority)posterior                         2.568e-01  3.437e-01  4.610e+04   0.747   0.4549
factor(laterality)right:factor(anteriority)posterior                        1.763e-01  3.437e-01  4.610e+04   0.513   0.6080
factor(congruity)TRUE:factor(laterality)left:factor(anteriority)posterior  -5.162e-02  4.813e-01  4.610e+04  -0.107   0.9146
factor(congruity)TRUE:factor(laterality)right:factor(anteriority)posterior -2.420e-01  4.813e-01  4.610e+04  -0.503   0.6152
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) fc()TRUE fctr(ltrlty)l fctr(ltrlty)r fctr(n) fctr(cngrty)TRUE:fctr(ltrlty)l fctr(cngrty)TRUE:fctr(ltrlty)r
fctr(c)TRUE                       -0.310
fctr(ltrlty)l                     -0.306  0.504
fctr(ltrlty)r                     -0.306  0.504    0.500
fctr(ntrrt)                       -0.306  0.504    0.500         0.500
fctr(cngrty)TRUE:fctr(ltrlty)l     0.218 -0.706   -0.714        -0.357        -0.357
fctr(cngrty)TRUE:fctr(ltrlty)r     0.218 -0.706   -0.357        -0.714        -0.357   0.500
fctr(cngrty)TRUE:fctr(n)           0.218 -0.706   -0.357        -0.357        -0.714   0.500                          0.500
fctr(ltrlty)l:()                   0.216 -0.357   -0.707        -0.354        -0.707   0.505                          0.252
fctr(ltrlty)r:()                   0.216 -0.357   -0.354        -0.707        -0.707   0.252                          0.505
fctr(cngrty)TRUE:fctr(ltrlty)l:() -0.154  0.499    0.505         0.252         0.505  -0.707                         -0.354
fctr(cngrty)TRUE:fctr(ltrlty)r:() -0.154  0.499    0.252         0.505         0.505  -0.354                         -0.707
fctr(cngrty)TRUE:fctr(n) fctr(ltrlty)l:() fctr(ltrlty)r:() fctr(cngrty)TRUE:fctr(ltrlty)l:()
fctr(c)TRUE
fctr(ltrlty)l
fctr(ltrlty)r
fctr(ntrrt)
fctr(cngrty)TRUE:fctr(ltrlty)l
fctr(cngrty)TRUE:fctr(ltrlty)r
fctr(cngrty)TRUE:fctr(n)
fctr(ltrlty)l:()                   0.505
fctr(ltrlty)r:()                   0.505                    0.500
fctr(cngrty)TRUE:fctr(ltrlty)l:() -0.707                   -0.714           -0.357
fctr(cngrty)TRUE:fctr(ltrlty)r:() -0.707                   -0.357           -0.714            0.500
> anova(final.mod)
Analysis of Variance Table of type III  with  Satterthwaite
approximation for degrees of freedom
Sum Sq Mean Sq NumDF DenDF F.value    Pr(>F)
factor(congruity)                                        4439.1  4439.1     1 46142  39.850 2.768e-10 ***
factor(laterality)                                        572.9   286.5     2 46095   2.572  0.076430 .
factor(anteriority)                                      1508.1  1508.1     1 46095  13.538  0.000234 ***
factor(congruity):factor(laterality)                       31.6    15.8     2 46095   0.142  0.867581
factor(congruity):factor(anteriority)                     775.1   775.1     1 46095   6.958  0.008349 **
factor(laterality):factor(anteriority)                    111.9    56.0     2 46095   0.502  0.605126
factor(congruity):factor(laterality):factor(anteriority)   31.2    15.6     2 46095   0.140  0.869183
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
``````

Get this bounty!!!

## #StackBounty: #time-series #hypothesis-testing #statistical-significance #t-test #binomial Hypothesis / significance tests to study cor…

### Bounty: 50

Assume I have two time series, A(t) and B(t). I do know the exact signals in A(t). I want to find out when a known signal in A(t) is causing a signal in B(t).

• In case of pure noise the data in both is distributed around the mean (not necessarily Gaussian, as there is systematic noise even after pre-whitening/detrending).
• Any signal will increase in a time-dependent manner, peak, and decrease.
• A(t) can cause a signal in B(t), but will not always cause one.
• If it causes a signal, the impact is immediate (at lag 0).
• Both have independent (systematic) noise properties.
• If there is no signal in A(t) there is no signal in B(t) expected
(however there might be systematic noise that looks similar).

My current analyses:

1. First, I look at the data from the time series point-of-view, and perform auto-correlation, cross-correlation and rolling correlation analyses. I use the signal-to-noise ratio in e.g. the cross-correlation as a handle on ‘significance’ (not in a statistical sense).
2. Second, I try to explore other statistical options. Assume I do know when in time the signal in A(t) starts and ends. I extract the time points in B(t) at these times as a seperate sample, B*.
• I perform a T-test to see whether B* data is distributed around the mean of B(t).
• I perform a binominal test to see whether B* data is randomly distributed around the mean, or biased in any direction.

I.e. if B* data contains a signal, both tests will reject the Null Hypotheses. However, this somewhat decreases my signal-to-noise ratio, as it includes the ramping parts of the signal, which are not that far off the mean.

My questions are:

1. are any of these tests redundant?
2. how do I retrieve values of ‘statistical significance’ from the cross-correlation etc?
3. are there any other possibilities to analyse this data that I am not thinking of (either as time series or as seperate sample B*)?

Get this bounty!!!

## #StackBounty: #hypothesis-testing #t-test #p-value Estimating "population p-value" \$Pi\$ using an observed p-value

### Bounty: 100

I asked a similar question last month, but from the responses, I see how the question can be asked more precisely.

Let’s suppose a population of the form

\$\$X sim mathcal{N}(100 + t_{n-1} times sigma / sqrt{n}, sigma)\$\$

in which \$t_{n-1}\$ is the student \$t\$ quantile based on a specific value of a parameter \$Pi\$ (\$0<Pi<1)\$. For the sake of the illustration, we could suppose that \$Pi\$ is 0.025.

When performing a one-sided \$t\$ test of the null hypothesis \$H_0: mu = 100\$ on a sample taken from that population, the expected \$p\$ value is \$Pi\$, irrespective of sample size (as long as simple randomized sampling is used).

I have 4 questions:

1. Is the \$p\$ value a maximum likelihood estimator (MLE) of \$Pi\$? (Conjecture: yes, because it is based on a \$t\$ statistic which is based on a likelihood ratio test);

2. Is the \$p\$ value a biased estimator of \$Pi\$? (Conjecture: yes because (i) MLE tend to be biased, and (2) based on simulations, I noted that the median value of many \$p\$s is close to \$Pi\$ but the mean value of many \$p\$s is much larger);

3. Is the \$p\$ value a minimum variance estimate of \$Pi\$? (Conjecture: yes in the asymptotic case but no guarantee for a given sample size)

4. Can we get a confidence interval around a given \$p\$ value by using the confidence interval of the observed \$t\$ value (this is done using the non-central student \$t\$ distribution with degree of freedom \$n-1\$ and non-centrality parameter \$t\$) and computing the \$p\$ values of the lower and upper bound \$t\$ values? (Conjecture: yes because both the non-central student \$t\$ quantiles and the \$p\$ values of a one-sided test are continuous increasing functions)

Get this bounty!!!

## #StackBounty: #hypothesis-testing #t-test #p-value Estimating "population p-value" \$Pi\$ using an observed p-value

### Bounty: 100

I asked a similar question last month, but from the responses, I see how the question can be asked more precisely.

Let’s suppose a population of the form

\$\$X sim mathcal{N}(100 + t_{n-1} times sigma / sqrt{n}, sigma)\$\$

in which \$t_{n-1}\$ is the student \$t\$ quantile based on a specific value of a parameter \$Pi\$ (\$0<Pi<1)\$. For the sake of the illustration, we could suppose that \$Pi\$ is 0.025.

When performing a one-sided \$t\$ test of the null hypothesis \$H_0: mu = 100\$ on a sample taken from that population, the expected \$p\$ value is \$Pi\$, irrespective of sample size (as long as simple randomized sampling is used).

I have 4 questions:

1. Is the \$p\$ value a maximum likelihood estimator (MLE) of \$Pi\$? (Conjecture: yes, because it is based on a \$t\$ statistic which is based on a likelihood ratio test);

2. Is the \$p\$ value a biased estimator of \$Pi\$? (Conjecture: yes because (i) MLE tend to be biased, and (2) based on simulations, I noted that the median value of many \$p\$s is close to \$Pi\$ but the mean value of many \$p\$s is much larger);

3. Is the \$p\$ value a minimum variance estimate of \$Pi\$? (Conjecture: yes in the asymptotic case but no guarantee for a given sample size)

4. Can we get a confidence interval around a given \$p\$ value by using the confidence interval of the observed \$t\$ value (this is done using the non-central student \$t\$ distribution with degree of freedom \$n-1\$ and non-centrality parameter \$t\$) and computing the \$p\$ values of the lower and upper bound \$t\$ values? (Conjecture: yes because both the non-central student \$t\$ quantiles and the \$p\$ values of a one-sided test are continuous increasing functions)

Get this bounty!!!

## #StackBounty: #hypothesis-testing #t-test #p-value Estimating "population p-value" \$Pi\$ using an observed p-value

### Bounty: 100

I asked a similar question last month, but from the responses, I see how the question can be asked more precisely.

Let’s suppose a population of the form

\$\$X sim mathcal{N}(100 + t_{n-1} times sigma / sqrt{n}, sigma)\$\$

in which \$t_{n-1}\$ is the student \$t\$ quantile based on a specific value of a parameter \$Pi\$ (\$0<Pi<1)\$. For the sake of the illustration, we could suppose that \$Pi\$ is 0.025.

When performing a one-sided \$t\$ test of the null hypothesis \$H_0: mu = 100\$ on a sample taken from that population, the expected \$p\$ value is \$Pi\$, irrespective of sample size (as long as simple randomized sampling is used).

I have 4 questions:

1. Is the \$p\$ value a maximum likelihood estimator (MLE) of \$Pi\$? (Conjecture: yes, because it is based on a \$t\$ statistic which is based on a likelihood ratio test);

2. Is the \$p\$ value a biased estimator of \$Pi\$? (Conjecture: yes because (i) MLE tend to be biased, and (2) based on simulations, I noted that the median value of many \$p\$s is close to \$Pi\$ but the mean value of many \$p\$s is much larger);

3. Is the \$p\$ value a minimum variance estimate of \$Pi\$? (Conjecture: yes in the asymptotic case but no guarantee for a given sample size)

4. Can we get a confidence interval around a given \$p\$ value by using the confidence interval of the observed \$t\$ value (this is done using the non-central student \$t\$ distribution with degree of freedom \$n-1\$ and non-centrality parameter \$t\$) and computing the \$p\$ values of the lower and upper bound \$t\$ values? (Conjecture: yes because both the non-central student \$t\$ quantiles and the \$p\$ values of a one-sided test are continuous increasing functions)

Get this bounty!!!

## #StackBounty: #hypothesis-testing #t-test #p-value Estimating "population p-value" \$Pi\$ using an observed p-value

### Bounty: 100

I asked a similar question last month, but from the responses, I see how the question can be asked more precisely.

Let’s suppose a population of the form

\$\$X sim mathcal{N}(100 + t_{n-1} times sigma / sqrt{n}, sigma)\$\$

in which \$t_{n-1}\$ is the student \$t\$ quantile based on a specific value of a parameter \$Pi\$ (\$0<Pi<1)\$. For the sake of the illustration, we could suppose that \$Pi\$ is 0.025.

When performing a one-sided \$t\$ test of the null hypothesis \$H_0: mu = 100\$ on a sample taken from that population, the expected \$p\$ value is \$Pi\$, irrespective of sample size (as long as simple randomized sampling is used).

I have 4 questions:

1. Is the \$p\$ value a maximum likelihood estimator (MLE) of \$Pi\$? (Conjecture: yes, because it is based on a \$t\$ statistic which is based on a likelihood ratio test);

2. Is the \$p\$ value a biased estimator of \$Pi\$? (Conjecture: yes because (i) MLE tend to be biased, and (2) based on simulations, I noted that the median value of many \$p\$s is close to \$Pi\$ but the mean value of many \$p\$s is much larger);

3. Is the \$p\$ value a minimum variance estimate of \$Pi\$? (Conjecture: yes in the asymptotic case but no guarantee for a given sample size)

4. Can we get a confidence interval around a given \$p\$ value by using the confidence interval of the observed \$t\$ value (this is done using the non-central student \$t\$ distribution with degree of freedom \$n-1\$ and non-centrality parameter \$t\$) and computing the \$p\$ values of the lower and upper bound \$t\$ values? (Conjecture: yes because both the non-central student \$t\$ quantiles and the \$p\$ values of a one-sided test are continuous increasing functions)

Get this bounty!!!

## #StackBounty: #hypothesis-testing #t-test #p-value Estimating "population p-value" \$Pi\$ using an observed p-value

### Bounty: 100

I asked a similar question last month, but from the responses, I see how the question can be asked more precisely.

Let’s suppose a population of the form

\$\$X sim mathcal{N}(100 + t_{n-1} times sigma / sqrt{n}, sigma)\$\$

in which \$t_{n-1}\$ is the student \$t\$ quantile based on a specific value of a parameter \$Pi\$ (\$0<Pi<1)\$. For the sake of the illustration, we could suppose that \$Pi\$ is 0.025.

When performing a one-sided \$t\$ test of the null hypothesis \$H_0: mu = 100\$ on a sample taken from that population, the expected \$p\$ value is \$Pi\$, irrespective of sample size (as long as simple randomized sampling is used).

I have 4 questions:

1. Is the \$p\$ value a maximum likelihood estimator (MLE) of \$Pi\$? (Conjecture: yes, because it is based on a \$t\$ statistic which is based on a likelihood ratio test);

2. Is the \$p\$ value a biased estimator of \$Pi\$? (Conjecture: yes because (i) MLE tend to be biased, and (2) based on simulations, I noted that the median value of many \$p\$s is close to \$Pi\$ but the mean value of many \$p\$s is much larger);

3. Is the \$p\$ value a minimum variance estimate of \$Pi\$? (Conjecture: yes in the asymptotic case but no guarantee for a given sample size)

4. Can we get a confidence interval around a given \$p\$ value by using the confidence interval of the observed \$t\$ value (this is done using the non-central student \$t\$ distribution with degree of freedom \$n-1\$ and non-centrality parameter \$t\$) and computing the \$p\$ values of the lower and upper bound \$t\$ values? (Conjecture: yes because both the non-central student \$t\$ quantiles and the \$p\$ values of a one-sided test are continuous increasing functions)

Get this bounty!!!

## #StackBounty: #hypothesis-testing #t-test #p-value Estimating "population p-value" \$Pi\$ using an observed p-value

### Bounty: 100

I asked a similar question last month, but from the responses, I see how the question can be asked more precisely.

Let’s suppose a population of the form

\$\$X sim mathcal{N}(100 + t_{n-1} times sigma / sqrt{n}, sigma)\$\$

in which \$t_{n-1}\$ is the student \$t\$ quantile based on a specific value of a parameter \$Pi\$ (\$0<Pi<1)\$. For the sake of the illustration, we could suppose that \$Pi\$ is 0.025.

When performing a one-sided \$t\$ test of the null hypothesis \$H_0: mu = 100\$ on a sample taken from that population, the expected \$p\$ value is \$Pi\$, irrespective of sample size (as long as simple randomized sampling is used).

I have 4 questions:

1. Is the \$p\$ value a maximum likelihood estimator (MLE) of \$Pi\$? (Conjecture: yes, because it is based on a \$t\$ statistic which is based on a likelihood ratio test);

2. Is the \$p\$ value a biased estimator of \$Pi\$? (Conjecture: yes because (i) MLE tend to be biased, and (2) based on simulations, I noted that the median value of many \$p\$s is close to \$Pi\$ but the mean value of many \$p\$s is much larger);

3. Is the \$p\$ value a minimum variance estimate of \$Pi\$? (Conjecture: yes in the asymptotic case but no guarantee for a given sample size)

4. Can we get a confidence interval around a given \$p\$ value by using the confidence interval of the observed \$t\$ value (this is done using the non-central student \$t\$ distribution with degree of freedom \$n-1\$ and non-centrality parameter \$t\$) and computing the \$p\$ values of the lower and upper bound \$t\$ values? (Conjecture: yes because both the non-central student \$t\$ quantiles and the \$p\$ values of a one-sided test are continuous increasing functions)

Get this bounty!!!

## #StackBounty: #hypothesis-testing #t-test #p-value Estimating "population p-value" \$Pi\$ using an observed p-value

### Bounty: 100

I asked a similar question last month, but from the responses, I see how the question can be asked more precisely.

Let’s suppose a population of the form

\$\$X sim mathcal{N}(100 + t_{n-1} times sigma / sqrt{n}, sigma)\$\$

in which \$t_{n-1}\$ is the student \$t\$ quantile based on a specific value of a parameter \$Pi\$ (\$0<Pi<1)\$. For the sake of the illustration, we could suppose that \$Pi\$ is 0.025.

When performing a one-sided \$t\$ test of the null hypothesis \$H_0: mu = 100\$ on a sample taken from that population, the expected \$p\$ value is \$Pi\$, irrespective of sample size (as long as simple randomized sampling is used).

I have 4 questions:

1. Is the \$p\$ value a maximum likelihood estimator (MLE) of \$Pi\$? (Conjecture: yes, because it is based on a \$t\$ statistic which is based on a likelihood ratio test);

2. Is the \$p\$ value a biased estimator of \$Pi\$? (Conjecture: yes because (i) MLE tend to be biased, and (2) based on simulations, I noted that the median value of many \$p\$s is close to \$Pi\$ but the mean value of many \$p\$s is much larger);

3. Is the \$p\$ value a minimum variance estimate of \$Pi\$? (Conjecture: yes in the asymptotic case but no guarantee for a given sample size)

4. Can we get a confidence interval around a given \$p\$ value by using the confidence interval of the observed \$t\$ value (this is done using the non-central student \$t\$ distribution with degree of freedom \$n-1\$ and non-centrality parameter \$t\$) and computing the \$p\$ values of the lower and upper bound \$t\$ values? (Conjecture: yes because both the non-central student \$t\$ quantiles and the \$p\$ values of a one-sided test are continuous increasing functions)

Get this bounty!!!

## #StackBounty: #hypothesis-testing #t-test #p-value Estimating "population p-value" \$Pi\$ using an observed p-value

### Bounty: 100

I asked a similar question last month, but from the responses, I see how the question can be asked more precisely.

Let’s suppose a population of the form

\$\$X sim mathcal{N}(100 + t_{n-1} times sigma / sqrt{n}, sigma)\$\$

in which \$t_{n-1}\$ is the student \$t\$ quantile based on a specific value of a parameter \$Pi\$ (\$0<Pi<1)\$. For the sake of the illustration, we could suppose that \$Pi\$ is 0.025.

When performing a one-sided \$t\$ test of the null hypothesis \$H_0: mu = 100\$ on a sample taken from that population, the expected \$p\$ value is \$Pi\$, irrespective of sample size (as long as simple randomized sampling is used).

I have 4 questions:

1. Is the \$p\$ value a maximum likelihood estimator (MLE) of \$Pi\$? (Conjecture: yes, because it is based on a \$t\$ statistic which is based on a likelihood ratio test);

2. Is the \$p\$ value a biased estimator of \$Pi\$? (Conjecture: yes because (i) MLE tend to be biased, and (2) based on simulations, I noted that the median value of many \$p\$s is close to \$Pi\$ but the mean value of many \$p\$s is much larger);

3. Is the \$p\$ value a minimum variance estimate of \$Pi\$? (Conjecture: yes in the asymptotic case but no guarantee for a given sample size)

4. Can we get a confidence interval around a given \$p\$ value by using the confidence interval of the observed \$t\$ value (this is done using the non-central student \$t\$ distribution with degree of freedom \$n-1\$ and non-centrality parameter \$t\$) and computing the \$p\$ values of the lower and upper bound \$t\$ values? (Conjecture: yes because both the non-central student \$t\$ quantiles and the \$p\$ values of a one-sided test are continuous increasing functions)

Get this bounty!!!