Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Write using R code. The probability of rejecting at least one null hypothesis given all null hypotheses are true is 1 - ( 1

Please Write using R code.
The probability of rejecting at least one null hypothesis given all null hypotheses are true is 1-(1-0.05)^k. Suppose the p-value for each single hypothesis test is obtained. Use the Benjami and Hochberg algorithm.First label the p values in ascending order such that p1< p2<..< p(k) and denote by H(ti the null hypothesis corresponding to p(i). Second, define i0 as the largest i p(i)<0.05i /k. The decision rule rejects all H(i) for i=1.. i(0). Write a function named as bd.adjust using the Benjami Hochber g algorithm. The arguments of this function include a numerical vector pvs of p-value and significance level a (set its default value =0.05). the output will be a logic vector having the same length as the pvs, using FALSE(F) to denote rejecting a specific null hypothesis. For example, (T, F, T) means the algorithm rejects the second null but fails to reject the first and third. Note that the output should be the final decisions for the series of hypotheses in the original order based on the Benjamini and Hochberg algorithm. Implement your function bh.adjust(pvs) with the following vectors for pvs
pvs=c(0.04,0.02)
pvs=c(0.039,0.024,0.35,0.009,0.1)
pvs=c(0.34,0.015,0.029,0.008,0.49)
pvs=c(0.34,0.015,0.029,0.008,0.49,0.001,0.72,0.54)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Decision Making in Groups Leadership in Meetings

Answered: 1 week ago