(a) Program your own function in R to do the following: The input is a data.frame...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
(a) Program your own function in R to do the following: The input is a data.frame of n rows with each row containing (y, ₁,,p) and a positive integer B. It does the following calculation: repeat for b = 1,2,, B: randomly sample n rows of the data with replacement, putting them into a new data.frame and fit OLS of y 2 against all the predictors. Keep the fitted coefficient (b). For each j = 1, ...,p, B Jb=1* we have B estimates {3}₁. Plot the histogram of the B values and return the 2.5% and 97.5% quantiles of the set, denoted by CI.j. Such intervals are called bootstrap confidence intervals. (a) Program your own function in R to do the following: The input is a data.frame of n rows with each row containing (y, ₁,,p) and a positive integer B. It does the following calculation: repeat for b = 1,2,, B: randomly sample n rows of the data with replacement, putting them into a new data.frame and fit OLS of y 2 against all the predictors. Keep the fitted coefficient (b). For each j = 1, ...,p, B Jb=1* we have B estimates {3}₁. Plot the histogram of the B values and return the 2.5% and 97.5% quantiles of the set, denoted by CI.j. Such intervals are called bootstrap confidence intervals.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these accounting questions
-
The euro was launched in January 1999 with an official initial value against the dollar of $1.16/. As of 2016 the currency exchange rate was $1.0634/ . Thus, over this time period (from Jan 1999 to...
-
Use a Minkowski diagram to do the following problem: Two people stand a distance d apart. They simultaneously start accelerating in the same direction (along the line between them), each with proper...
-
Use the data in Short Exercise to do the following for Saxton Technologies: Saxton Technologies began the year with inventory of $480. During the year, Saxton purchased inventory costing $1,180 and...
-
A recent PwC Supply Global Chain survey indicated that companies that acknowledge the supply chain as a strategic asset achieve 70% higher performance. The Leaders in the survey point to...
-
The American Chamber of Commerce Researchers Association compiles cost-of-living indexes for selected metropolitan areas. Shown here are cost-of-living indexes for 25 different cities on five...
-
Camera technology, specifically film, was not historically designed to capture everyone equally. The chemistry that creates color balance did not address yellow, brown, and reddish skin tones until...
-
The English scores for a sample of 14 students Find the mean, the median, and the mode of the data, if possible. If any measure cannot be found or does not represent the center of the data, explain...
-
Rapture Corporation had the following transactions. 1. Issued $200,000 of bonds payable. 2. Paid utilities expense. 3. Issued 500 shares of preferred stock for $45,000. 4. Sold land and a building...
-
London Transit is a public transport provider in London, faces a new challenge as criminal activities begin to surface along some of its bus routes. These incidents range from theft and vandalism...
-
Mendina, Incorporated produces an advanced type of coffee maker. Information about the coffee maker is below: Total Variable Cost at 200 units Total Cost per Unit Sales Price Target Profit Volume...
-
Please discuss the importance of constructing a proper sample from a population and what can happen to your data if you don't. For example: your doctor has put you on a new medication that has only...
-
A gas mixture at a total pressure of \(150 \mathrm{kPa}\) and \(295 \mathrm{~K}\) contains \(20 \% \mathrm{H}_{2}, 40 \%\) \(\mathrm{O}_{2}\), and \(40 \% \mathrm{H}_{2} \mathrm{O}\) by volume. The...
-
It is desired to dry \(10 \mathrm{~kg} / \mathrm{min}\) of soap continuously from \(20 \%\) moisture by weight to \(4 \%\) moisture in a countercurrent stream of hot air. The air enters the dryer at...
-
A gas stream flows at the rate of \(10.0 \mathrm{~m}^{3} / \mathrm{s}\) at \(300 \mathrm{~K}\) and \(102 \mathrm{kPa}\). It consists of an equimolar mixture of ammonia and air. The gas enters through...
-
Oxygen uptake by the blood is faster than oxygen uptake by water because of the reaction of oxygen with hemoglobin. Many chemists have dreamed of inventing a new compound capable of fast, selective...
-
It is desired to increase by \(50 \%\) the oxygen flux in the process described in Example 1.22 by changing the pore size while maintaining all the other conditions unchanged. Calculate the required...
-
Why would an organization use outplacement strategies before downsizing? Outplacing employees helps former employees develop new skill sets. Outplacement strategies are a means of eliminating problem...
-
After looking at the resources, explain what a spirit image is. Why might looking at a god and/or a human in terms of their spirit be helpful if you want to eliminate some of the divisions between...
-
A block is placed on a plane inclined at angle . The coefficient of friction between the block and the plane is = tan . The block is given a kick so that it initially moves with speed V horizontally...
-
A rocket with proper length L accelerates from rest, with proper acceleration g (where gL where the last term is the standard special-relativistic ??head-start?? result. Derive the above relation by...
-
A particle of mass m is subject to a force F(t) = mebt. The initial position and speed are zero. Find x(t).
-
Solve Example 7.5 with equilibrium energy as the initial condition for the Oxygen molecule at 1 atmosphere and \(3200 \mathrm{~K}\). Example 7.5 Obtain the time dependent expression for the vibration...
-
Obtain a pseudo tri-diagonal matrix equation to solve the vorticity transport equation in a boundary layer with forward differencing in time and with appropriate differencing in space suitable for...
-
If the waverider of the Problem 7.44 has the wall temperature of \(1400 \mathrm{~K}\) and \(\operatorname{Re}=1.371 \times 10^{6}\) with respect to its length then find the drag coefficient with...
Study smarter with the SolutionInn App