Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I have R programming questions. I need your help. Thank you. 2. For this question, you Will need to install the package 'dplyr' into

Hello, I have R programming questions.

I need your help.

Thank you.

image text in transcribedimage text in transcribedimage text in transcribed
2. For this question, you Will need to install the package 'dplyr' into R by typing in the command installpackagestplyr?). Then you need to load dplyr into R by typing in the command library(dplyr). We Will be using the sta'rwa'rs data set that is built into the dplyr package. (a) Create a vector called names Which contains the names of starvvars characters that are included in the data set. (b) The function ncharO determines the number of characters in a string. How many char acters are in the 5th, 20th, and 34th elements of the names vector? (c) Create an empty numeric vector called nnmLhnr. Write a loop Which calculates the number of characters in each element of the names vector, and puts the corresponding number in the nnm,cha'r vector. (d) Now do the same thing that you did in part (c) using the lapplyO or sapplyO function in R. Be careful that your output is a vector. 3. Consider again the homework3Data.csv dataset and the variable X. (a) Write a bootstrap computing the median on 10, 000 samples (with replacement ) of size 600 of the variable X. (b) Plot the resulting sampling distribution for the median of X. (c) Determine an estimate for the median of X. (d) Compute a 95% confidence interval for the median of X.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Precalculus Enhanced With Graphing Utilities (Subscription)

Authors: Michael Sullivan, Michael Sullivan III

7th Edition

0134273125, 9780134273129

More Books

Students also viewed these Mathematics questions

Question

Always have the dignity of the other or others as a backdrop.

Answered: 1 week ago