Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Hypothesis testing assesses whether data are inconsistent with a given hypothesis (usually a null hypothesis of no effect).
2
votes
Accepted
One sided likelihood ratio test for a logistic regression model?
A one-sided LRT is straightforward in R using the signed LRT statistic. Fit the logistic regression models with and without the $\beta$ term. Compute the ordinary LRT statistic from the deviance diffe …
24
votes
Accepted
What does the assumption of the Fisher test that "The row and column totals should be fixed"...
In my opinion, the source that you link to is wrong in that it is confusing conditioning with assumptions.
Fisher's exact test conditions on the margin totals, meaning that it does not use any informa …
9
votes
Accepted
How do I perform a statistical test for a Difference-in-Differences analysis?
The difference in differences is what is called an interaction in statistics (as Dimitriy Masterov has already pointed out). You want to test whether the time effect is different when you intervene co …
5
votes
Accepted
False discovery rate correction when all P value are equal
The Benjamini-Hochberg FDR calculation performed by p.adjust seems perfectly appropriate in your situation. There is no theoretical problem with tied p-values in Benjamini and Hochberg's 1995 theorem …
0
votes
H0;b1=0, b2=1 testing null hypothesis
Yes, the approach and code that you have stated is correct, and the F-test in the output will test the null hypothesis that b1=0 and b2=1 vs the alternative that b1 and b2 are unspecified.
You are tes …
2
votes
When is a hypothesis test appropriate?
That's a fair question and the answer relates to the difference between taking a population census and taking a sample. It depends of how the statistics of 3.1% and 4.5% were obtained. Do you have com …
9
votes
Accepted
How does this test compares to Pearson's test?
I think you are trying to rediscover the G-test or likelihood ratio test.
Your $H$ is a scaled version of the G statistic, which is defined as
$$G=2\sum_{i=1}^m O_i \log(O_i/E_i)$$
with $E_i=n/m$.
$G$ …
0
votes
Binary t-Test Order
treatment <- relevel(treatment, ref = "B")
t.test(height ~ treatment)
Or alternatively
treatment <- factor(treatment, levels=c("B","A"))
would also have worked.
8
votes
How do you program a custom hypothesis test in R?
The hypothesis test functions in the stats package use classic S3 object-orientated programming. You write a function that creates a "htest" object, which is a list with a standard set of components, …
9
votes
Accepted
Fisher's Exact test implementation in R
You have chosen to do a one-sided test and, obviously, order is important in a one-sided test. Your first call to fisher.test is testing the null hypothesis Pct1 = Pct2 vs the alternative that Pct1 < …
7
votes
How to calculate FDR and Power?
If you are using R and want use the method of Benjamini and Hochberg (1995) to control the FDR, then you can use:
FDR <- p.adjust(p, method="BH")
where $p$ is the vector of p-values to compute BH a …
2
votes
Accepted
Bayesian test on Poisson Distribution
First,
ppois(20,9.8,lower.tail=FALSE)
actually computes $P(X>20 | \theta=9.8)$ rather than $P(X\ge 20 | \theta=9.8)$. So to compute the p-value for $H_0$ vs $H_1$ you actually need
> ppois(20-0.5, …
18
votes
Many p-values are equal to 1 after Bonferroni correction; is it normal?
Nothing went wrong. The adjusted p-values are correct. Adjusted $p=1$ simply means no evidence at all for rejecting the null hypothesis.
However
p.adjust(data2$raw.p, method = "holm")
is always b …
3
votes
Test for zero mean and variance equal to one
Unless you know the parametric form of the distribution (e.g., normal), there is no way to construct a rigorous formal test of the hypothesis using classical methods.
If the sample is large, and if t …