DEPARTMENT OF ECONOMICS ECON 4041H – RESEARCH METHODOLOGY Fall 2021, Peterborough Assignment #4 Due date: December 10, 2021 Instructions: You must provide your own unique solution. You may work with...

1 answer below »
Assignment 4 is to be completed all questions. Please give detail answers for the findings.
Attached is:Assignment 4 pdfrds fileassignment 3 question 2 which you will need for question 1 of assignment 4





DEPARTMENT OF ECONOMICS ECON 4041H – RESEARCH METHODOLOGY Fall 2021, Peterborough Assignment #4 Due date: December 10, 2021 Instructions: You must provide your own unique solution. You may work with others, but each of you is responsible for submitting your own problem set solution. Each question is 30 marks and each part is of equal value. Submission of one file knit from RMarkdown is best, but acceptable alternatives are allowed. 1. Re-estimate the models from assignment 3, question 2, but now use the log(wage) as the dependent variable. Include the same set of covariates/explanatory variables: age, age2, sex, educational attainment, sector of employment, collective agreement status, firm size, immigrant status and province. In assessing the question, here are items to consider: a. Should age be in log form? Note that none of the other explanatory variables are numeric, so only consider the issue of the log-transformation for the numeric transfor- mation of age. b. Which model format fits best, with or without the log transformed wage as dependent variable? c. What does the model predict for unemployment rates across provinces? d. Does immigrant status interact with the other explanatory variables in explaining wage differences? To analyze, first estimate the model from assignment 3, question 2, part c. Then generate predicted values of wages using emmeans() with the “type = ‘response’ ” parameter to convert from log-transformed values back into dollars. Do this for each pair of variables interacted with immigrant status, but no need to include age, age2 or province. Plots really help visualize these effects. 2. Predict the impact of immigrant status on the probability of unemployment. • You need to define the unemployment variable. The dataset contains the variable lfsstat which has four categories, two identifying employed (at work, or absent from work), one for unemployed, and one for those not in the labour force. Recode this variable by defining a new variable, unemploy, as: unemploy =  TRUE for those unemployed FALSE for those employed (2 categories) NA for those not in the labour force (1) ECON 4041H - Assignment 4 • Estimate your model using a subset of the variables from question 1: age, age2, sex, educational attainment, sector of employment, immigrant status and province.1 • For ease of analysis, recode the variable cowmain into a new variable sector with three categories: public, private, and self-employed. Drop the category "Unpaid family worker" by setting it to NA. • Since the variable unemploy takes on two values: TRUE and FALSE, estimate a logit model. Use the glm() function with the option “family = binomial” which yields a logit prediction model. In assessing the question, here are items to consider: a. Should age (and age2) be in log form? Note that none of the other explanatory vari- ables are numeric, so only consider the issue of the log-transformation for the numeric version of age. b. What does the model predict for unemployment rates across provinces? c. Does immigrant status interact with the other explanatory variables in explaining dif- ferences in the probabilities of unemployment? To analyze, first estimate a model with immigrant status interacted with the other categorical explanatory variables (not age or province), then generate predicted probabilities of unemployment using emmeans() with the “type = ‘response’ ” parameter to convert log-odds into probabilities. Do this for each pair of immigrant status-educational attainment, immigrant status-sex, and immigrant status-sector of employment. Plots really help visualize these effects. 3. Use the dataset General Social Survey Canada 2016 dataset “gssA4Q3.rds” to test whether money can buy happiness. Specifically, does happiness increase with income? Include ap- propriate covariates that might otherwise explain happiness. The file contains the following variables: • hap5: happiness, categorical: 1–least happy through 5–most happy • ttlincg2: income (before tax), categorical • agegr10: age of respondent, by 10-year age categories • sex: • marstat: marital status • mar_110: main activity of respondent • ehg3: educational attainment • rlr_110: importance of religion • vismin: visible minority status • srh_110: self-reported health The dependent variable hap5 is an ordered categorical variable with more than two cate- gories. Treat the happiness variable as if it were unordered and estimate a model using multinom(). Then re-estimate the same model treating happiness as an ordered categori- cal variable and use polr(). All have been shown to influence happiness. There are many other potential covariates of happiness. These are a selection that may be interesting and 1We are dropping the variables collective agreement status and firmsize because those values are NA for the unem- ployed. Collective agreement status and firm size do not apply to the unemployed, and the survey doesn’t code for the value of previous employment. 2 ECON 4041H - Assignment 4 that happen to have been addressed in the 2016 GSS of Canada. Try estimating your model with different subsets of the variables listed above as covariates. Note, you cannot use all the possible variables in the dataset in one model. Emmeans() cannot handle a model with too many categories. You will know when you have too many categories when emmeans() gives you a message indicating the size exceeds the grid’s capacity. Once you have settled on the set of independent variables, only estimate the one model with each function. Make sure you address the question, does money buy happiness? 3 lfs_df21 <- readrds("~/data/lfs21.rds")=""><-lfs_df21%>% filter(age_12!="70 and over") lfs_df$age=lfs_df$age_12 lfs_df$wage=lfs_df$hrlyearn lfs_df$age=as.numeric(lfs_df$age) lfs_df$wage=as.numeric(lfs_df$wage) lfs_df<-lfs_df%>% mutate(im2=ifelse(immig=="Non-immigrant","Non-immigrant","Immigrant"))%>% mutate(ca2=ifelse(union=="Non-unionized","Non-unionized","Covered-Collective-agreement")) #%>% # mutate_if(is.character,factor) Q.2(a). Q2_mod<-lm(wage~age+i(age^2)+educ+sex+ca2+im2+cowmain+firmsize+prov,data=lfs_df) summary(q2_mod)="" ##="" ##="" call:="" ##="" lm(formula="wage" ~="" age="" +="" i(age^2)="" +="" educ="" +="" sex="" +="" ca2="" +="" im2="" +="" ##="" cowmain="" +="" firmsize="" +="" prov,="" data="lfs_df)" ##="" ##="" residuals:="" ##="" min="" 1q="" median="" 3q="" max="" ##="" -43.215="" -7.428="" -1.473="" 5.525="" 77.620="" ##="" ##="" coefficients:="" ##="" estimate="" std.="" error="" t="" value="" pr(="">|t|) ## (Intercept) 3.982917 0.510466 7.803 6.14e-15 ## age 4.774620 0.072091 66.230< 2e-16="" ##="" i(age^2)="" -0.317012="" 0.005913="" -53.609="">< 2e-16="" ##="" educsome="" high="" school="" 1.261637="" 0.406858="" 3.101="" 0.00193="" ##="" educhigh="" school="" graduate="" 2.129278="" 0.387420="" 5.496="" 3.90e-08="" ##="" educsome="" postsecondary="" 3.197833="" 0.411303="" 7.775="" 7.64e-15="" ##="" educpostsecondary="" certificate="" or="" diploma="" 5.723664="" 0.382207="" 14.975="">< 2e-16="" ##="" educbachelor's="" degree="" 11.948389="" 0.389321="" 30.690="">< 2e-16="" ##="" educabove="" bachelor's="" degree="" 16.855738="" 0.403659="" 41.757="">< 2e-16="" ##="" sexfemale="" -5.201711="" 0.083482="" -62.309="">< 2e-16="" ##="" ca2non-unionized="" 0.336650="" 0.110664="" 3.042="" 0.00235="" ##="" im2non-immigrant="" 4.331353="" 0.110756="" 39.107="">< 2e-16="" ##="" cowmainprivate="" sector="" employees="" -4.155718="" 0.119660="" -34.729="">< 2e-16="" ##="" firmsize20="" to="" 99="" employees="" 1.956708="" 0.140281="" 13.949="">< 2e-16="" ##="" firmsize100="" to="" 500="" employees="" 3.141274="" 0.143731="" 21.855="">< 2e-16="" ##="" firmsizemore="" than="" 500="" employees="" 4.932237="" 0.121355="" 40.643="">< 2e-16="" ##="" provprince="" edward="" island="" -2.032285="" 0.335886="" -6.051="" 1.45e-09="" ##="" provnova="" scotia="" -1.760881="" 0.295396="" -5.961="" 2.52e-09="" ##="" provnew="" brunswick="" -2.217299="" 0.292218="" -7.588="" 3.29e-14="" ##="" provquebec="" 1.337800="" 0.252766="" 5.293="" 1.21e-07="" ##="" provontario="" 3.547768="" 0.248251="" 14.291="">< 2e-16 ## provmanitoba 0.660738 0.267316 2.472 0.01345 ## provsaskatchewan 2.651351 0.280268 9.460 2e-16="" ##="" provmanitoba="" 0.660738="" 0.267316="" 2.472="" 0.01345="" ##="" provsaskatchewan="" 2.651351="" 0.280268="">
Answered 2 days AfterNov 22, 2021

Answer To: DEPARTMENT OF ECONOMICS ECON 4041H – RESEARCH METHODOLOGY Fall 2021, Peterborough Assignment #4 Due...

Subhanbasha answered on Nov 24 2021
118 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here