Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Thank you!!! 4. This question requires you to download data obtained from Statistics Canada. If you are working on campus go to www.odesi.ca (off campus

Thank you!!!

image text in transcribedimage text in transcribedimage text in transcribed
4. This question requires you to download data obtained from Statistics Canada. If you are working on campus go to www.odesi.ca (off campus users must first sign into the McMaster library via libaccess at library.memaster.ca/libaccess, search for odesi via the library search facilities then select odesi from these search results). Next, select the "Find data" field in odesi and search for "Labour Force Survey June, 2020", then scroll down and select the Labour Force Survey, June 2020 /Canada). Next click on the "Explore & Download" icon, then click on the download icon (i.e., the diskette icon, square, along the upper right of the browser pane) and then click on "Select Data Format" then scroll down and select "Comma Separated Value file" (esv) which, after a brief pause, will download the data to your hard drive (you may have to extract the file from a zip archive depending on which operating system you are using). Finally, make sure that you place this cav file in the same directory as your R code file (this file ought to have the name LFS-71M0001-E-2020-June_Fl.csu, and in RStudio select the menu item Session -> Set Working Directory -> To Source File Location). There will be another file with (almost) the same name but with the extension .pdf that is the pdf documentation that describes the variables in this data set. Note that it would be prudent to retain this file as we will use it in future assignments (this question is worth 10 marks). Next, open RStudio, make sure this cav file and your R Markdown script are in the same directory (in RStudio open the Files tab (lower right pane by default) and refresh the file listing if necessary). Then read the file as follows: Ifp () $HRLYEARN ba () $HRLYEARN These commands simply tell R to take a subset of the data frame Ifp for full-time workers having either a high school diploma or university bachelors degree for those reporting positive earnings, and then retain only the variable HRLYEARN and store these in the variables named hs (hourly earnings for high-school graduates) or ba (hourly earnings for university graduates). Conduct a t-test of the hypothesis that the average wage is equal for the two groups using the R function t. test () (see ?t. test () for details).ii. Using the PDF that accompanies the data titled "Canada Labour Statistics Division, Statistics Canada Labour Force Survey, June 2020 [Canada], Study Documentation, present a description of each variable that we select below (i.e., HRLYEARN, EDUC, SEX, AGE_12, MARSTAT, UNION; see pages 15 and on for details). foo 0, select = c (HRLYEARN, EDUC, SEX, AGE_12, MARSTAT, UNION) )iii. Estimate the multivariate linear regression model and produce a model summary via summary (model). model

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

Step: 3

blur-text-image

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

China Under Mao A Revolution Derailed

Authors: Andrew G Walder

1st Edition

0674975499, 9780674975491

More Books

Students also viewed these Economics questions