Create a logistic regression model using glm to predict

Assignment Help Computer Engineering
Reference no: EM133719142

Assignment: R Programming Worksheet

In an R Markdown document, write the appropriate code in an r chunk (use ```{r} to start a chunk and ``` to end it) and answer the questions in the normal white space on the document. R markdown will automatically print the plots when you knit the markdown document, so you don't need to save them anywhere else.

Required packages: tidyverse, jtools, kableExtra

Problem 1: Linear regression, model 1

1. Create a new object called employed by filtering (dplyr method) the data to include only people who are employed (in government, private company/organization, or self-employed).

2. Create a linear model that predicts income as a function of age, sex, and origin region for the dataframe created in I1.

3. Use summ() (from the jtools package). What is the reference category for this model?

4. What do the results of summ() tell you?

5. Use plot_summs() to print a plot of the variables in your model.

Problem 2: Linear regression, model 2

1. Create a linear model that predicts income as a function of age, sex, and language at home for employed people in the data.

2. Use summ(). What is the reference category for this model?

3. What do the results of summ() tell you?

4. Use plot_summs() to print a plot of the variables in your model.

Problem 3: Linear regression, model 3

1. Create a linear model that predicts income as a function of age, sex, language at home, and education for employed people in the data.

2. Use summ(). What is the reference category for this model?

3. What do the results of summ() tell you?

4. Use plot_summs() to print a plot of the variables in your model.

5. Instead of the education variable, run the same model with the binary "completed_college" variable.

Problem 4: Analysis

1. Look back at your results from the linear models. Look back at the expectations you wrote down in Homework. Which of your hypotheses/expectations seemed accurate? Did you find any surprises? Based on these linear models, would you say that differences in income among these groups are mainly based on age differences among the groups, on differences in education levels, or on differences in each groups' migration background and/or unique culture? Explain. Use specific examples of what the estimates (Est.) from these different models mean (focus on estimates with p values <= 0.05).

Problem 5: Logistic regression, model 1

1. Use the dplyr method (pipeline) to calculate what percentage of males and females in the data are self-employed

2. Since males have a much higher percentage of self-employment, create a new data frame by filtering to include only males. This might help isolate whether differences in culture, age, or education are better predictors of self-employment.

3. Set the reference categories for the language_at_home, origin_region, and education variables in your new data frame. I suggest setting them for the groups who you expect to have the lowest levels of self-employment.

4. Create a logistic regression model using glm(family = "binomial") to predict self-employment as a function of age and origin region.

5. Use summ() with exp = TRUE. What is the reference category for your model?

6. What do the results of summ() mean?

7. Use plot_summs() to print a plot of the variables in your model.

Problem 6: Logistic regression, model 2

1. Create a logistic regression model to predict self-employment as a function of age, language at home, and education.

2. Use summ() with exp = TRUE. What is the reference category for your model?

3. What do the results of summ() mean?

4. Use plot_summs() to print a plot of the variables in your model.

Problem 7: Analysis

1. Look back at your results from the logistic/binomial models in Problems V and VI. Look back at your expectations about what predictor variables would affect self-employment from Homework. Which of your hypotheses/expectations seemed accurate? Did you find any surprises? Based on these logistic models, would you say that differences in self-employment among males from these groups are mainly based on age differences among the groups, on differences in education levels, or on differences in each groups' migration background and/or unique culture? Explain what the models tell you about the relative effects of the predictor variables on self-employment. Pay particular attention to the odds ratios (exp(Est.)) with p values < = 0.05.

Reference no: EM133719142

Questions Cloud

Explain how your selected presidents worked to improve : Explain how your selected presidents worked to improve the United States economically and socially. Give at least one example of each president.
Discuss the benefits of including transgender individuals : Discuss benefits of including transgender individuals in military. Mention enhanced diversity, increased talent pool, and improved morale among service members.
How would you compare your candidacy for the two positions : Assess how would you compare your candidacy for these two positions as well as how would you bridge your academic qualification or skill gaps?
How philosophy and practice of political authority change : Drawing upon evidence from the readings answer the prompt: How did the philosophy and practice of political authority change from Antiquity to Renaissance?
Create a logistic regression model using glm to predict : Create a logistic regression model using glm(family = binomial) to predict self-employment as a function of age and origin region.
What is the default setting and how does david wallace : What is the default setting and how does David Wallace (Kenyon Commencement Speech) believe Academic Education influences a default setting?
Develop a dynamic online system that allows users : ITBP 321 Web App Development Lab - develop a dynamic online system that allows users to interact with a database through a secure login page.
What do you see as most important things that parents can do : CHFD 308 American Military University- What do you see as the most important things that parents can do to help their children at this point in their lives?
How can the company improve groupawareness in the company : How can the company improve groupawareness in the company and State the process of using a microcosm group to address organization-wide issues.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Discuss the layers of culture that are evident in the case

What would you recommend managers do to ensure a smooth integration of the information systems, given the culture differences?

  Discuss various arithmetic operations in each type

Discuss various arithmetic operations in each type with examples. Identify which operation gives more accurate results and how it affects calculation errors. Discuss the implementation of simple logic and arithmetic functions in digital logic.

  What role does urgency play in regard to the security i

What role does urgency play in regard to the security interface? Research a unique news story or article related to Information Security.

  Can you reduce the stalls for this code

Re-arrange the loop without unrolling. You can move individual instructions, however the output of this dummy loop should be exactly the same.

  Calculate the access speeds after the track requests

calculate the access speeds after the track requests are reordered and rank the four disk drives before and after reordering.

  How to illustrate decision table to represent treatment

How to illustrate decision table to represent treatment? Create a structured English version based on the following dialogue obtained by the Systems Analyst from the client interview below.

  Find the largest size n of input that can be processed

Find the largest size n of input that can be processed by each of these programs in (a) one second, (b) one minute, (c) one day, and (d) one year.

  Create a kali hacking tools presentation

Explain the syntax of the commands you use. Your presentation must include at least 6 screenshots that demonstrate different features of the tool.

  Discuss the issue by giving examples in c pascal or ada

Perform a complete recompilation (i.e., a compilation of all the modules)? Discuss the issue by giving examples in C, Pascal, Modula-2, Java, C++, or Ada.

  Define vision statements in relation to the two frameworks

Assess the vision statements in relation to the two frameworks. What are your conclusions about each of the visions? Do they have the "wow" factor? Why?

  Why did you select a phd in information technology

Why did you select a PhD in Information Technology? Why did you choose the University of the Cumberland? As an individual, what are your strengths.

  Write a program to find the area of a triangle

Build a function to accept the sides of the triangle (check if the sides form a triangle if yes returns the area otherwise returns zero.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd