Question: 2. In this question you will use simulation to understand the power to detect an association for logistic regression. Simulation is when we repeatedly create

 2. In this question you will use simulation to understand the

2. In this question you will use simulation to understand the power to detect an association for logistic regression. Simulation is when we repeatedly create new data sets, fit a statistical model to each one, and evaluate how the model does over all data sets. Power is defined as the probability of rejecting the null hypothesis when the alternative hypothesis is true. To evaluate power, you can generate 1000 data sets in R, and keep track of what proportion of them have the null hypothesis rejected. In this question, we will focus on the standard logistic regression model taking the form log 1 - 7(X) = Bo+ Bie We will focus on the power for rejecting the null hypothesis, Ho : 81 = 0. Draw new a values from a standard normal distribution and then sample Y from the above logistic model. Sample code for drawing one new data set can be found in the help. R code that accompanies the exam. Power is a function of both the sample size, n and the true parameter, 81. I want you to calcu- late power for all combinations of n E {25, 50, 100, 250, 500} and 31 6 {0.1, 0.2, 0.3, 0.4, 0.5} Therefore your answer should contain 25 numbers, one for each combination of sample size and 8, value. You can either present the results visually with a plot, or as a 5 by 5 table of values. For all data sets, you can fix the intercept, So = 0.5. Note that to get full credit for this question, your accompanying R file must have well organized code to create these results

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!