Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Based upon the statistical methods and tests covered in our textbooks, students will sample from a data set using R Studio/R code to execute several
Based upon the statistical methods and tests covered in our textbooks, students will sample from a data set using R Studio/R code to execute several sampling techniques and will analyze their results in a submitted Word file that includes a copy of their R code.
Instructions
Data Sets- statesforsampling.Rdata.
Download this R Script for running the code: PADM 5850 Data Analysis 1-1.RDownload PADM 5850 Data Analysis 1-1.R
- Download the dataframe from the above link titled "statesforsampling.Rdata." Either place a copy in your folder (working directory) or upload the data into RStudio Cloud.
- Download this R Script your instructor created for you for the assignment. [insert link].
- If you are working in RStudio Cloud, upload the script. Laptop users place a copy of the R Script into your working directory folder and then open it up in RStudio.
- In the code, it instructs you to do simple random sampling first. Run the random sampling code "without replacement" three separate times (same code, hit run three separate times). The state numbers for each sample will be in the bottom left Console. In your Word file, type up the three state names and numbers you selected for each of the three runs. Repeat this again but now run the code in line 16 four times "with replacement." Report this in the Word file, state numbers and name for each of the four samples.
- Install the package sampler so we can do stratified random sampling.
- Use the library command to allow us to use the package?
- Separately, run the "ssamp" commands on lines 24-26. Cut and paste those samples into your Word File?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started