Can gender, educational level, and age predict the odds that someone votes for a particular candidate in the election? Over 1500 voters were selected, and data were col-lected on the highest year of school completed, their age, and their gender. We wish to t a logistic regression model: log(1 p p ) = 0 + 1Age + 2Education + 3Gender, where p is the binomial probability that a person voted for candidate Johnson, and gender is coded as the indicator for female. The R output is given below.
Correlation
Correlation defines a relationship between two independent variables. It tells the degree to which variables move in relation to each other. When two sets of data are related to each other, there is a correlation between them.
Linear Correlation
A correlation is used to determine the relationships between numerical and categorical variables. In other words, it is an indicator of how things are connected to one another. The correlation analysis is the study of how variables are related.
Regression Analysis
Regression analysis is a statistical method in which it estimates the relationship between a dependent variable and one or more independent variable. In simple terms dependent variable is called as outcome variable and independent variable is called as predictors. Regression analysis is one of the methods to find the trends in data. The independent variable used in Regression analysis is named Predictor variable. It offers data of an associated dependent variable regarding a particular outcome.
- Can gender, educational level, and age predict the odds that someone votes for a particular candidate in the election? Over 1500 voters were selected, and data were col-lected on the highest year of school completed, their age, and their gender. We wish to t a logistic regression model: log(1 p p ) = 0 + 1Age + 2Education + 3Gender, where p is the binomial probability that a person voted for candidate Johnson, and gender is coded as the indicator for female. The R output is given below.
parameter |
df |
estimate |
s.e |
z |
p-value |
(Intercept) |
1 |
.1119 |
.3481 |
.321 |
.748 |
Age |
1 |
.0020 |
.0032 |
.613 |
.54 |
Education |
1 |
-.0100 |
.0184 |
.547 |
.585 |
Gender |
1 |
.4282 |
.1040 |
4.117 |
.000 |
Null deviance: 255.95 on 1499 degrees of freedom
Residual deviance: 220.80 on 1496 degrees of freedom
- Write down the tted logistic regression and give a short summary about the data analysis .
- Calculate the probability of voting for Johnson for a 35-year-old male with 16 years of school?
- Find the odds ratio of voting for Johnson between female and male while controlling age and education and interpret the odds ratio.
- Find the 95% confidence interval for the odds ratio of voting for Johnson between female and male .
- The researcher tted another model with Gender as the only predictor and get the result below. Test whether the two nonsigni cant terms (Age and Education) can be both removed from the model in (a), write down the H0, Ha, test statistic, p-value and conclusion:
parameter |
df |
estimate |
s.e |
z |
p-value |
(Intercept) |
1 |
.1325 |
.3584 |
.370 |
.711 |
Gender |
1 |
.6723 |
.1258 |
5.344 |
.000 |
Null deviance: 255.95 on 1499 degrees of freedom
Residual deviance: 227.39 on 1498 degrees of freedom
Trending now
This is a popular solution!
Step by step
Solved in 2 steps