You will be using the "usdata" package's "county" data #  for this assignment. # You will need to run:#  install.packages("usdata")# once to install this library - do not include the#  install.packages command in your submission#  as it can cause gradescope to fail ## ## ## ## ## DO NOT MODIFY BELOW ## ## ## ## ## library(usdata)county<-as.data.frame(county)county<-county[,1:14]county<-county[rowSums(is.na(county))==0,]# The set.seed command will ensure your results are consistent#  each time you run the "source" commandset.seed(311)## ## ## ## ## DO NOT MODIFY ABOVE ## ## ## ## ##  # Treating the "county" dataset as the population of US counties#  create the dataframe "my.SRS" that represents a simple#  random sample of n=250 individual counties from all counties in the US. my.SRS <- NA   # Treating the "county" dataset as the population of US counties#  create the dataframe "my.Stratified" that represents a stratified#  sample of individual counties from all counties in the US, statified #  along the level of education (median_edu). Due to the different sizes of strata,#  you should sample: #  1 county from "below_hs", 140 from "hs_diploma", 170 from "some_college"#  and 4 from "bachelors" my.Stratified <- NA #The numbers here should match those specified above# Uncomment after your data frame has been defined to check your work#  table(my.Stratified$median_edu) # Treating the "county" dataset as the population of US counties#  create the dataframe "my.Clustered" that represents a cluster#  sample of individual counties from all counties in the US, clustered by state. #  You should randomly sample counties from a total of 5 clusters. my.Clustered <- NA #This should only give 5 total states# Uncomment after your data frame has been defined to check your work#  unique(my.Clustered$state)

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter11: Sql Server Databases
Section: Chapter Questions
Problem 2E
icon
Related questions
Question

 You will be using the "usdata" package's "county" data 
#  for this assignment. 
# You will need to run:
#  install.packages("usdata")
# once to install this library - do not include the
#  install.packages command in your submission
#  as it can cause gradescope to fail

## ## ## ## ## DO NOT MODIFY BELOW ## ## ## ## ## 
library(usdata)
county<-as.data.frame(county)
county<-county[,1:14]
county<-county[rowSums(is.na(county))==0,]
# The set.seed command will ensure your results are consistent
#  each time you run the "source" command
set.seed(311)
## ## ## ## ## DO NOT MODIFY ABOVE ## ## ## ## ## 


# Treating the "county" dataset as the population of US counties
#  create the dataframe "my.SRS" that represents a simple
#  random sample of n=250 individual counties from all counties in the US.

my.SRS <- NA

 

# Treating the "county" dataset as the population of US counties
#  create the dataframe "my.Stratified" that represents a stratified
#  sample of individual counties from all counties in the US, statified 
#  along the level of education (median_edu). Due to the different sizes of strata,
#  you should sample: 
#  1 county from "below_hs", 140 from "hs_diploma", 170 from "some_college"
#  and 4 from "bachelors"

my.Stratified <- NA

#The numbers here should match those specified above
# Uncomment after your data frame has been defined to check your work
#  table(my.Stratified$median_edu)

# Treating the "county" dataset as the population of US counties
#  create the dataframe "my.Clustered" that represents a cluster
#  sample of individual counties from all counties in the US, clustered by state. 
#  You should randomly sample counties from a total of 5 clusters.

my.Clustered <- NA

#This should only give 5 total states
# Uncomment after your data frame has been defined to check your work
#  unique(my.Clustered$state)

Expert Solution
steps

Step by step

Solved in 2 steps with 8 images

Blurred answer
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
A Guide to SQL
A Guide to SQL
Computer Science
ISBN:
9781111527273
Author:
Philip J. Pratt
Publisher:
Course Technology Ptr
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning