Question: (a) To investigate the distributions, simulate from this model 2500 times. To do so, calculate P [ Y =1 X = x ]P[Y=1X=x] for an
(a)To investigate the distributions, simulate from this model 2500 times. To do so, calculate
P[Y=1X=x]P[Y=1X=x]
for an observation, and then make a random draw from a Bernoulli distribution with that success probability. (Note that a Bernoulli distribution is a Binomial distribution with parametern=1n=1. There is no direction function inRfor a Bernoulli distribution.)
Each time, fit the model:
log(p(x)1p(x))=0+1x1+2x2+3x3log(p(x)1p(x))=0+1x1+2x2+3x3
Store the test statistics for two tests:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
