R Script Help Code Boot Function Bootstrap Package Don T Use Write Function Produce 95 Boo Q37074283

In R script (help with code) (there is a bootfunction in a bootstrap package — don’t usethis!)

Write a function to produce a 95% bootstrap confidence intervalfor a mean. (using functions andloops)

Your function should: Draw a sample the same size as the vector,selecting from the vector itself, with replacement. Compute themean of the vector, and store it in another vector. Repeat thesteps above n times. Compute the interval as the 2.5% and 97.5%quantiles of the vector of means.


Solution


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.