Page 1 of 1

Type the following in R, set.seed (300) x = rmultinom(1e3, size=20,prob=c(.25,.5,.25)) You now have a 3 x 10' matrix of

Posted: Wed May 18, 2022 4:50 pm
by answerhappygod
Type The Following In R Set Seed 300 X Rmultinom 1e3 Size 20 Prob C 25 5 25 You Now Have A 3 X 10 Matrix Of 1
Type The Following In R Set Seed 300 X Rmultinom 1e3 Size 20 Prob C 25 5 25 You Now Have A 3 X 10 Matrix Of 1 (38.06 KiB) Viewed 45 times
Type the following in R, set.seed (300) x = rmultinom(1e3, size=20,prob=c(.25,.5,.25)) You now have a 3 x 10' matrix of samples from a multinomial distribution. The n-th col of the matrix corresponds to an n-th sample, which is a triple (i,j,k) of integers which sum to 20. Suppose you were given the data and you assumed that it is distributed as a Multinomial(20,p) where p = (P1, P2, P3) with PL + P2 + p = 1. You want to find the best estimate for these parameter values. Use maximum likelihood estimate to determine what p is equal to. Say your initial guess is p = 0.33, 33, 33). Now run the method of steepest descent algorithm (optim) to determine p. In the box below only input the value p2.