Question: 1. set.seed(@) It ensures that your sequence of random samples is the same as mine, so that we will get the same answers. Find the

 1. set.seed(@) It ensures that your sequence of random samples isthe same as mine, so that we will get the same answers.Find the smaller of the two critical 1? values, fux). - x15 a data vector - n. boot is the desired number of

1.

resamples from x # It returns a vector of n. boot t-hatvalues. bootstrap = function(x, n. boot) { n = length(x) x. bar= mean(x) t. hat = numeric (n. boot) # create vector oflength n. boot zeros for (i in 1:n. boot) { X. star

set.seed(@) It ensures that your sequence of random samples is the same as mine, so that we will get the same answers. Find the smaller of the two critical 1? values, fux). - x 15 a data vector - n. boot is the desired number of resamples from x # It returns a vector of n. boot t-hat values. bootstrap = function(x, n. boot) { n = length(x) x. bar = mean(x) t. hat = numeric (n. boot) # create vector of length n. boot zeros for (i in 1:n. boot) { X. star = sample(x, size=n, replace=TRUE) x. bar . star = mean(x. star) 5. star = sd(x. star) t. hat [i] = (x. bar . star - x. bar) / (s. star / sqrt(n)) return(t. hat)\fThe length of time a patient stays in a hospital is a variable of great interest for insurance and resource allocation purposes. In a given hospital, a simple random sample of lengths of stay in the intensive care unit was taken, with these (sorted) results in hours: 10, 20, 40, 60, 120, 150, 200, 300, 400. Create a QQ-plot of the observations. Which of the following three does it look the most like? sample theoretical oz ox OY

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!