--- title: "Assignment 4" author: "Your name and ID here" date: "01/02/2020" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) # packages library(AER)...

1 answer below »
MAKE HTML DOCUMENT



--- title: "Assignment 4" author: "Your name and ID here" date: "01/02/2020" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) # packages library(AER) library(tidyverse) library(wooldridge) # load model summary and set options library(modelsummary) gm <- modelsummary::gof_map="" gm$omit=""><- true="" gm$omit[1]=""><- false="" gm$omit[6]=""><- false="" gm$omit[5]=""><- false="" gm$omit[17]=""><- false="" ```="" ##="" instructions="" please="" read="" each="" question="" and="" answer="" where="" appropriate.="" the="" assignment="" is="" graded="" on="" a="" scale="" from="" 1="" to="" 5.="" i="" grade="" effort="" as="" well="" as="" content.="" that="" means="" to="" obtain="" a="" 5,="" every="" question="" must="" be="" attempted,="" and="" i="" am="" a="" kind="" grader="" if="" the="" effort="" was="" high,="" but="" the="" result="" was="" not="" quite="" right.="" after="" you="" answer="" the="" questions,="" `knit`="" the="" document="" to="" html="" and="" submit="" on="" moodle.="" i="" will="" **only="" grade**="" html.="" if="" you="" submit="" the="" `rmd`="" file="" instead,="" you="" will="" receive="" a="" zero.="" you="" have="" been="" warned,="" so="" there="" will="" be="" no="" exceptions.="" groups="" of="" up="" to="" four="" are="" allowed,="" but="" every="" student="" must="" submit="" their="" own="" assignment.="" **if="" an="" interpretation="" of="" output="" is="" asked="" for,="" but="" only="" output="" or="" code="" is="" given,="" the="" question="" will="" get="" zero="" points**="" #="" question="" 1:="" polynomails="" and="" interactions="" this="" question="" uses="" the="" wooldridge="" data="" set="" `wage1`.="" i="" have="" loaded="" it="" below="" to="" a="" data="" frame="" called="" `wage1`.="" the="" purpose="" of="" this="" question="" is="" to="" get="" used="" to="" interpreting="" coefficients="" with="" different="" functional="" form="" assumptions.="" ```{r}="" wage1=""><- wooldridge::wage1="" %="">% filter(complete.cases(.)) ``` Consider the generic regression: $$ y = \beta_0 + \beta_1 x_1 + \beta_2 x_1^2 + \beta_3 x_2 + \beta_4 x_3 + \beta_5 (x_2\cdot x_3) + u $$ Here, the variable $x_1$ is entered into the regression twice -- once as a 'main' effect and once as a squared term. Consider the partial effect of increasing $x_1$ by 1 unit. $$ \frac{\partial y}{\partial x_1} = \beta_1 + \beta_2 x_1 $$ This says that the marginal impact on $y$ from a one unit increase in $x_1$ is not a constant, but a function. The impact depends on the value of $x_1$. For example, suppose that $\beta_1$ is positive and $\beta_2$ is negative. This means that the relationship between $y$ and $x_1$ exhibits decreasing marginal returns. That is, when $x_1$ increases from 0 to 1, the $\frac{\partial y}{\partial x_1}$ is higher than going from 2 to 3 and so on. If we graph this, it would look like an inverted 'U'. For example, it might look like: ```{r} fig.data <- data.frame(x="1:10)" %="">% mutate(y = 100 + 20 * x - 1.5*x^2) ggplot(fig.data, aes(y = y, x = x)) + geom_line() + labs(title = "Typical diminishing marginal returns profile") ``` We can find the the point at which `x_1` turns from positive to negative (the inflection point) but setting $\frac{\partial y}{\partial x_1} = 0$ and solving for $x_1$. This yields $$ x^*_1 = \left|\frac{\beta_1}{2\cdot \beta_2}\right|. $$ The variables $x_2$ and $x_3$ also appear twice; each as an main effect and then as an interaction. Consider the partial effect of $x_2$ on $y$ $$ \frac{\partial y}{\partial x_2} = \beta_3 + \beta_5 x_2 $$ Again, this says that the impact of $x_2$ on $y$ is not a constant. It allows the impact to depend on the value of $x_3$. The treatment of $x_3$ is symmetric. We most often use these types of interactions when one term is a dummy variable. Suppose $x_3$ only takes on two values, 1 and 0. Then $$ \frac{\partial y}{\partial x_2} = \beta_3 + \beta_5 \text{ when } x_3 = 1 \text{ and } \frac{\partial y}{\partial x_2} = \beta_3 \text{ when } x_3 = 0 $$ Since dummy variables denote groups (ie, 2 groups), this allows each group to have its own intercept ($\beta_4$) and slope. Graphically, it looks like: ```{r} ggplot(wage1 %>% filter(educ>5), aes(y = lwage, x = educ, color = factor(west))) + geom_smooth(method = 'lm', se = F) ``` Where each line is a regression of log wages on education, with an interaction for living in the west. The return education for workers in the western United States in this data is higher than the return for those in the rest of the country. In `R`, we can create variables "on the fly" to use in regressions. We use this mostly to create interaction terms and low order polynomial terms. Consider the following code that would estimate the following equation $$ y = \beta_0 + \beta_1 x_1 + \beta_2 x_1^2 + \beta_3 x_2 + \beta_4 x_3 + \beta_5 (x_2\cdot x_3) + u $$ In the code below, each regression is exactly the same, just different ways of expressing it: ```{r, eval = F} mod <- lm(y="" ~="" x_1="" +="" i(x_1^2)="" +="" x_2="" *="" x_3,="" data="data.frame)" mod=""><- lm(y="" ~="" poly(x1,2,="" raw="T)" +="" x_2="" *="" x_3,="" data="data.frame)" mod=""><- lm(y="" ~="" x_1="" +="" i(x_1^2)="" +="" x_2="" +="" x_3="" +="" x_2:x_3,="" data="data.frame)" mod=""><- lm(y="" ~="" x_1="" +="" i(x_1^2)="" +="" x_2="" +="" x_3="" +="" i(x_2*x_3),="" data="data.frame)" ```="" the="" term="" `i()`="" is="" an="" "insulator="" function".="" it="" tells="" `r`="" to="" evaluate="" the="" expression="" inside="" first,="" then="" run="" the="" regression.="" the="" notation="" for="" `x_2*x_3`="" says="" to="" include="" main="" effects="" for="" each="" variable,="" plus="" and="" interaction.="" the="" notation="" `x_2:x_3`="" just="" includes="" an="" interaction.="" finally,="" `poly()`="" constructs="" low="" order="" polynomials.="" the="" `raw="T`" option="" is="" important.="" ```{r}="" wage1=""><- wooldridge::wage1="" %="">% filter(complete.cases(.)) # fit models models <- list(="" lm(lwage="" ~="" educ="" +="" exper="" +="" i(exper^2)="" +="" nonwhite="" +="" female="" ,="" data="wage1)," lm(lwage="" ~="" educ*female="" +="" exper="" +="" i(exper^2)="" +="" nonwhite="" ,="" data="wage1)" )="" #="" table="" modelsummary(models,="" fmt="5," statistics_override="sandwich," stars="T," gof_map="gm)" ```="" 1.="" in="" the="" first="" column,="" interpret="" the="" return="" to="" experience="" (`exper`).="" after="" how="" many="" years="" of="" experience="" does="" the="" relationship="" turn="" negative?="" 2.="" in="" column="" two,="" what="" is="" the="" return="" to="" education="" for="" men="" and="" women.="" are="" the="" returns="" to="" education="" significantly="" different="" for="" men="" and="" women?="" #="" question="" 2:="" teaching="" evaluations="" many="" college="" courses="" conclude="" by="" giving="" students="" the="" opportunity="" to="" evaluate="" the="" course="" and="" the="" instructor="" anonymously.="" however,="" the="" use="" of="" these="" student="" evaluations="" as="" an="" indicator="" of="" course="" quality="" and="" teaching="" effectiveness="" is="" often="" criticized="" because="" these="" measures="" may="" reflect="" the="" influence="" of="" non-teaching="" related="" characteristics,="" such="" as="" the="" physical="" appearance="" of="" the="" instructor.="" the="" article="" titled,="" “beauty="" in="" the="" classroom:="" instructors’="" pulchritude="" and="" putative="" pedagogical="" productivity”="" (hamermesh="" and="" parker,="" 2005)="" found="" that="" instructors="" who="" are="" viewed="" to="" be="" better="" looking="" receive="" higher="" instructional="" ratings.=""> Daniel S. Hamermesh, Amy Parker, Beauty in the classroom: instructors pulchritude and putative pedagogical productivity, Economics of Education Review, Volume 24, Issue 4, August 2005, Pages 369-376, ISSN 0272-7757, 10.1016/j.econedurev.2004.07.013. [Paper link - not required to read](http://www.sciencedirect.com/science/article/pii/S0272775704001165) ```{r} data("TeachingRatings") # load ratings data df <- teachingratings # re-name as df for convenience ``` 1. the data set `df` constructed in the above code chunk contains different types of variables. use the command `str()` on the data frame `df` to answer below: (a) what type of variable is `credits`? what fraction of the data are single credit courses? (b) what type of variable is `allstudents`? what is the largest class in the data set? (c) construct a variable called `frac` that is the proportion of students in the class that filled out the evaluation. what is the average particiaption rate? 2. you can see the variable definitions by typing "?teachingratings" in the console. suppose we are interested in estimating a causal effect of `beauty` on `eval`. that is, $$ eval_i = \beta_0 + \beta_1 beauty_i + \eta_i $$ using the strategy discussed in class and in chapter 7.6, construct a regression table evaluating the causal effect of beauty on teaching evaluations. your regression table should consider several specifications, starting with the bivariate regression above and then adding more controls, possibly in groups. for each specification, state why you think its important to include for the controls you add. your answer should relate to the cia assumption. interpret your results, do you think that beauty has a causal impact on evaluations. if yes, defend your answer. if not, state why not. ```{r} # regression table here ``` 3. run a regression of `eval` on `beauty`, `gender`, `minority`, `credits`, `division`, `tenure`, `native`. consider my data: i am male, non-minority, native english speaker, teaching multiple credit courses in an upper-division and i have tenure. while i don't have a `beauty` rating, according to [ratemyprofessor.com](https://www.ratemyprofessors.com/showratings.jsp?tid=2033571), i have an evaluation of 2.3. use your regression and my information to infer my what my `beauty` rating would be if i were in this data set. ```{r} # regression here ``` 4. in your regression you ran in part (3), the coefficient on gender shows that women have on average, after controlling for other characteristics, lower evaluations than men. this has lead to additional research on the topic -- evaluations are important for promotion and tenure decisions. add an interaction term between `beauty` and `gender`. interpret your results: is the marginal impact of beauty the same for men and women? are good-looking men treated differently from good-looking women by students in terms of their evaluations? ```{r} # regression here ``` # question 3: birth weight smoking during pregnancy has been shown to have significant adverse health effects for new born babies. smoking is thought to be a preventable cause of low birth weight of infants who in turn, need more resources at delivery and are more likely to have related health problems in infancy and beyond. despite these concerns, many women still smoke during pregnancy. in this section, we analyze the relationship between birth weight and smoking behavior, with the emphasis on identifying a _causal_ impact of smoking on the birth weight of newborns. the relationship we examine is: $$ \log(\texttt{birth weight})_i = \beta_0 + \beta_1 \texttt{smoking}_i + \eta_i $$ where $\texttt{smoking}_i$ will be measured by average cigarettes per day. the term $\eta_i$ captures all of the other things that determine birth weight aside from smoking. ### baseline analysis. investigate the birth weight-smoking relationship and present your results in a table teachingratings="" #="" re-name="" as="" df="" for="" convenience="" ```="" 1.="" the="" data="" set="" `df`="" constructed="" in="" the="" above="" code="" chunk="" contains="" different="" types="" of="" variables.="" use="" the="" command="" `str()`="" on="" the="" data="" frame="" `df`="" to="" answer="" below:="" (a)="" what="" type="" of="" variable="" is="" `credits`?="" what="" fraction="" of="" the="" data="" are="" single="" credit="" courses?="" (b)="" what="" type="" of="" variable="" is="" `allstudents`?="" what="" is="" the="" largest="" class="" in="" the="" data="" set?="" (c)="" construct="" a="" variable="" called="" `frac`="" that="" is="" the="" proportion="" of="" students="" in="" the="" class="" that="" filled="" out="" the="" evaluation.="" what="" is="" the="" average="" particiaption="" rate?="" 2.="" you="" can="" see="" the="" variable="" definitions="" by="" typing="" "?teachingratings"="" in="" the="" console.="" suppose="" we="" are="" interested="" in="" estimating="" a="" causal="" effect="" of="" `beauty`="" on="" `eval`.="" that="" is,="" $$="" eval_i="\beta_0" +="" \beta_1="" beauty_i="" +="" \eta_i="" $$="" using="" the="" strategy="" discussed="" in="" class="" and="" in="" chapter="" 7.6,="" construct="" a="" regression="" table="" evaluating="" the="" causal="" effect="" of="" beauty="" on="" teaching="" evaluations.="" your="" regression="" table="" should="" consider="" several="" specifications,="" starting="" with="" the="" bivariate="" regression="" above="" and="" then="" adding="" more="" controls,="" possibly="" in="" groups.="" for="" each="" specification,="" state="" why="" you="" think="" its="" important="" to="" include="" for="" the="" controls="" you="" add.="" your="" answer="" should="" relate="" to="" the="" cia="" assumption.="" interpret="" your="" results,="" do="" you="" think="" that="" beauty="" has="" a="" causal="" impact="" on="" evaluations.="" if="" yes,="" defend="" your="" answer.="" if="" not,="" state="" why="" not.="" ```{r}="" #="" regression="" table="" here="" ```="" 3.="" run="" a="" regression="" of="" `eval`="" on="" `beauty`,="" `gender`,="" `minority`,="" `credits`,="" `division`,="" `tenure`,="" `native`.="" consider="" my="" data:="" i="" am="" male,="" non-minority,="" native="" english="" speaker,="" teaching="" multiple="" credit="" courses="" in="" an="" upper-division="" and="" i="" have="" tenure.="" while="" i="" don't="" have="" a="" `beauty`="" rating,="" according="" to="" [ratemyprofessor.com](https://www.ratemyprofessors.com/showratings.jsp?tid="2033571)," i="" have="" an="" evaluation="" of="" 2.3.="" use="" your="" regression="" and="" my="" information="" to="" infer="" my="" what="" my="" `beauty`="" rating="" would="" be="" if="" i="" were="" in="" this="" data="" set.="" ```{r}="" #="" regression="" here="" ```="" 4.="" in="" your="" regression="" you="" ran="" in="" part="" (3),="" the="" coefficient="" on="" gender="" shows="" that="" women="" have="" on="" average,="" after="" controlling="" for="" other="" characteristics,="" lower="" evaluations="" than="" men.="" this="" has="" lead="" to="" additional="" research="" on="" the="" topic="" --="" evaluations="" are="" important="" for="" promotion="" and="" tenure="" decisions.="" add="" an="" interaction="" term="" between="" `beauty`="" and="" `gender`.="" interpret="" your="" results:="" is="" the="" marginal="" impact="" of="" beauty="" the="" same="" for="" men="" and="" women?="" are="" good-looking="" men="" treated="" differently="" from="" good-looking="" women="" by="" students="" in="" terms="" of="" their="" evaluations?="" ```{r}="" #="" regression="" here="" ```="" #="" question="" 3:="" birth="" weight="" smoking="" during="" pregnancy="" has="" been="" shown="" to="" have="" significant="" adverse="" health="" effects="" for="" new="" born="" babies.="" smoking="" is="" thought="" to="" be="" a="" preventable="" cause="" of="" low="" birth="" weight="" of="" infants="" who="" in="" turn,="" need="" more="" resources="" at="" delivery="" and="" are="" more="" likely="" to="" have="" related="" health="" problems="" in="" infancy="" and="" beyond.="" despite="" these="" concerns,="" many="" women="" still="" smoke="" during="" pregnancy.="" in="" this="" section,="" we="" analyze="" the="" relationship="" between="" birth="" weight="" and="" smoking="" behavior,="" with="" the="" emphasis="" on="" identifying="" a="" _causal_="" impact="" of="" smoking="" on="" the="" birth="" weight="" of="" newborns.="" the="" relationship="" we="" examine="" is:="" $$="" \log(\texttt{birth="" weight})_i="\beta_0" +="" \beta_1="" \texttt{smoking}_i="" +="" \eta_i="" $$="" where="" $\texttt{smoking}_i$="" will="" be="" measured="" by="" average="" cigarettes="" per="" day.="" the="" term="" $\eta_i$="" captures="" all="" of="" the="" other="" things="" that="" determine="" birth="" weight="" aside="" from="" smoking.="" ###="" baseline="" analysis.="" investigate="" the="" birth="" weight-smoking="" relationship="" and="" present="" your="" results="" in="" a="">
Answered Same DayDec 02, 2021

Answer To: --- title: "Assignment 4" author: "Your name and ID here" date: "01/02/2020" output: html_document...

Mohd answered on Dec 05 2021
156 Votes
Assignment 4
Assignment 4
Alain
5/12/2020
library(AER)
## Loading required package: car
## Loading required package: carData
## Loading required package: lmtest
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
## Loading required package: sandwich
## Loading required package: survival
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ ggplot2 3.3.2 ✓ purrr 0.3.4
## ✓ tibble 3.0.4 ✓ dplyr 1.0.2
## ✓ tidyr 1.1.2 ✓ stringr 1.4.0
## ✓ readr 1.4.0 ✓ forcats 0.5.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
## x dplyr::recode() masks car::recode()
## x purrr::some() masks car::some()
library(wooldridge)
install.packages("modelsummary")
## Installing package into '/home/rstudio-user/R/x86_64-pc-linux-gnu-library/4.0'
## (as 'lib' is unspecified)
gm <- modelsummary::gof_map
gm$omit <- TRUE
gm$omit[1] <- FALSE
gm$omit[6] <- FALSE
gm$omit[5] <- FALSE
gm$omit[17] <- FALSE
Question 1: polynomails and interactions
This question uses the Wooldridge data set wage1. I have loaded it below to a data frame called wage1. The purpose of this question is to get used to interpreting coefficients with different functional form assumptions.
wage1 <- wooldridge::wage1 %>%
filter(complete.cases(.))
Consider the generic regression: \[
y = \beta_0 + \beta_1 x_1 + \beta_2 x_1^2 + \beta_3 x_2 + \beta_4 x_3 + \beta_5 (x_2\cdot x_3) + u
\] Here, the variable \(x_1\) is entered into the regression twice – once as a ‘main’ effect and once as a squared term. Consider the partial effect of increasing \(x_1\) by 1 unit. \[
\frac{\partial y}{\partial x_1} = \beta_1 + \beta_2 x_1
\] This says that the marginal impact on \(y\) from a one unit increase in \(x_1\) is not a constant, but a function. The impact depends on the value of \(x_1\). For example, suppose that \(\beta_1\) is positive and \(\beta_2\) is negative. This means that the relationship between \(y\) and \(x_1\) exhibits decreasing marginal returns. That is, when \(x_1\) increases from 0 to 1, the \(\frac{\partial y}{\partial x_1}\) is higher than going from 2 to 3 and so on. If we graph this, it would look like an inverted ‘U’. For example, it might look like:
library(dplyr)
library(ggplot2)
fig.data <- data.frame(x = 1:10) %>%
mutate(y = 100 + 20 * x - 1.5*x^2)
ggplot(fig.data, aes(y = y, x = x)) +
geom_line() +
labs(title = "Typical diminishing marginal returns profile")
We can find the the point at which x_1 turns from positive to negative (the inflection point) but setting \(\frac{\partial y}{\partial x_1} = 0\) and solving for \(x_1\). This yields \[
x^*_1 = \left|\frac{\beta_1}{2\cdot \beta_2}\right|.
\]
The variables \(x_2\) and \(x_3\) also appear twice; each as an main effect and then as an interaction. Consider the partial effect of \(x_2\) on \(y\) \[
\frac{\partial y}{\partial x_2} = \beta_3 + \beta_5 x_2
\] Again, this says that the impact of \(x_2\) on \(y\) is not a constant. It allows the impact to depend on the value of \(x_3\). The treatment of \(x_3\) is symmetric. We most often use these types of interactions when one term is a dummy variable. Suppose \(x_3\) only takes on two values, 1 and 0. Then \[
\frac{\partial y}{\partial x_2} = \beta_3 + \beta_5 \text{ when } x_3 = 1 \text{ and } \frac{\partial y}{\partial x_2} = \beta_3 \text{ when } x_3 = 0
\] Since dummy variables denote groups (ie, 2 groups), this allows each group to have its own intercept (\(\beta_4\)) and slope. Graphically, it looks like:
head(wage1)
## wage educ exper tenure nonwhite female married numdep smsa northcen south
## 1 3.10 11 2 0 0 1 0 2 1 0 0
## 2 3.24 12 22 2 0 1 1 3 1 0 0
## 3 3.00 11 2 0 0 0
0 2 0 0 0
## 4 6.00 8 44 28 0 0 1 0 1 0 0
## 5 5.30 12 7 2 0 0 1 1 0 0 0
## 6 8.75 16 9 8 0 0 1 0 1 0 0
## west construc ndurman trcommpu trade services profserv profocc clerocc
## 1 1 0 0 0 0 0 0 0 0
## 2 1 0 0 0 0 1 0 0 0
## 3 1 0 0 0 1 0 0 0 0
## 4 1 0 0 0 0 0 0 0 1
## 5 1 0 0 0 0 0 0 0 0
## 6 1 0 0 0 0 0 1 1 0
## servocc lwage expersq tenursq
## 1 0 1.131402 4 0
## 2 1 1.175573 484 4
## 3 0 1.098612 4 0
## 4 0 1.791759 1936 784
## 5 0 1.667707 49 4
## 6 0 2.169054 81 64
ggplot(wage1 %>% filter(educ>5), aes(y = lwage, x = educ, color = factor(west))) +
geom_smooth(method = 'lm', se = F)
## `geom_smooth()` using formula 'y ~ x'
Where each line is a regression of log wages on education, with an interaction for living in the west. The return education for workers in the western United States in this data is higher than the return for those in the rest of the country.
In R, we can create variables “on the fly” to use in regressions. We use this mostly to create interaction terms and low order polynomial terms. Consider the following code that would estimate the following equation \[
y = \beta_0 + \beta_1 x_1 + \beta_2 x_1^2 + \beta_3 x_2 + \beta_4 x_3 + \beta_5 (x_2\cdot x_3) + u
\] In the code below, each regression is exactly the same, just different ways of expressing it:
The term I() is an “insulator function”. It tells R to evaluate the expression inside first, then run the regression. The notation for x_2*x_3 says to include main effects for each variable, plus and interaction. The notation x_2:x_3 just includes an interaction. Finally, poly() constructs low order polynomials. The raw=T option is important.
wage1 <- wooldridge::wage1 %>%
filter(complete.cases(.))
# fit models
models <- list(
lm(lwage ~ educ + exper + I(exper^2) + nonwhite + female , data = wage1),
lm(lwage ~ educ*female + exper + I(exper^2) + nonwhite , data = wage1)
)
# table
Question 2: Teaching evaluations
Many college courses conclude by giving students the opportunity to evaluate the course and the instructor anonymously. However, the use of these student evaluations as an indicator of course quality and teaching effectiveness is often criticized because these measures may reflect the influence of non-teaching related characteristics, such as the physical appearance of the instructor. The article titled, “Beauty in the classroom: instructors’ pulchritude and putative pedagogical productivity” (Hamermesh and Parker, 2005) found that instructors who are viewed to be better looking receive higher instructional ratings.
Daniel S. Hamermesh, Amy Parker, Beauty in the classroom: instructors pulchritude and putative pedagogical productivity, Economics of Education Review, Volume 24, Issue 4, August 2005, Pages 369-376, ISSN 0272-7757, 10.1016/j.econedurev.2004.07.013.
Paper link - not required to read
data("TeachingRatings") # load ratings data
df <- TeachingRatings # re-name as df for convenience
str(df)
## 'data.frame': 463 obs. of 12 variables:
## $ minority : Factor w/ 2 levels "no","yes": 2 1 1 1 1 1 1 1 1 1 ...
## $ age : int 36 59 51 40 31 62 33 51 33 47 ...
## $ gender : Factor w/ 2 levels "male","female": 2 1 1 2 2 1 2 2 2 1 ...
## $ credits : Factor w/ 2 levels "more","single": 1 1 1 1 1 1 1 1 1 1 ...
## $ beauty : num 0.29 -0.738 -0.572 -0.678 1.51 ...
## $ eval : num 4.3 4.5 3.7 4.3 4.4 4.2 4 3.4 4.5 3.9 ...
## $ division : Factor w/ 2 levels "upper","lower": 1 1 1 1 1 1 1 1 1 1 ...
## $ native : Factor w/ 2 levels "yes","no": 1 1 1 1 1 1 1 1 1 1 ...
## $ tenure : Factor w/ 2 levels "no","yes": 2 2 2 2 2 2 2 2 2 1 ...
## $ students : num 24 17 55 40 42 182 33 25 48 16 ...
## $ allstudents: num 43 20 55 46 48 282 41 41 60 19 ...
## $ prof : Factor w/ 94 levels "1","2","3","4",..: 1 2 3 4 5 6 7 8 9 10 ...
#What fraction of the data are single credit courses?
v<-nrow(filter(df,credits=="single"))
fraction<-v/nrow(df)
fraction
## [1] 0.05831533
sum(df$students)
## [1] 16957
#(b) What type of variable is `allstudents`?
class(df$allstudents)
## [1] "numeric"
# What is the largest class in the data set?
factor
## function (x = character(), levels, labels = levels, exclude = NA,
## ordered = is.ordered(x), nmax = NA)
## {
## if (is.null(x))
## x <- character()
## nx <- names(x)
## if (missing(levels)) {
## y <- unique(x, nmax = nmax)
## ind <- order(y)
## levels <- unique(as.character(y)[ind])
## }
## force(ordered)
## if (!is.character(x))
## x <- as.character(x)
## levels <- levels[is.na(match(levels, exclude))]
## f <- match(x, levels)
## if (!is.null(nx))
## names(f) <- nx
## if (missing(labels)) {
## levels(f) <- as.character(levels)
## }
## else {
## nlab <- length(labels)
## if (nlab == length(levels)) {
## nlevs <- unique(xlevs <- as.character(labels))
## at <- attributes(f)
## at$levels <- nlevs
## f <- match(xlevs, nlevs)[f]
## attributes(f) <- at
## }
## else if (nlab == 1L)
## levels(f) <- paste0(labels, seq_along(levels))
## else stop(gettextf("invalid 'labels'; length %d should be 1 or %d",
## nlab, length(levels)), domain = NA)
## }
## class(f) <- c(if (ordered) "ordered", "factor")
## f
## }
##
##
max(df$allstudents)
## [1] 581
#Construct a variable called frac that is the proportion of students in the class that filled out the evaluation.
mutate(df,frac=students/allstudents)
## minority age gender credits beauty eval division native tenure students
## 1 yes 36 female more 0.2899157 4.3 upper yes yes 24
## 2 no 59 male more -0.7377322 4.5 upper yes yes 17
## 3 no 51 male more -0.5719836 3.7 upper yes yes 55
## 4 no 40 female more -0.6779634 4.3 upper yes yes 40
## 5 no 31 female more 1.5097940 4.4 upper yes yes 42
## 6 no 62 male more 0.5885687 4.2 upper yes yes 182
## 7 no 33 female more -0.1260010 4.0 upper yes yes 33
## 8 no 51 female more -0.2581899 3.4 upper yes yes 25
## 9 no 33 female more 0.1496926 4.5 upper yes yes 48
## 10 no 47 male more 0.5409170 3.9 upper yes no 16
## 11 yes 35 male more 0.2316134 3.1 upper no yes 18
## 12 no 37 male more -0.0666737 4.0 upper yes no 30
## 13 no 42 male more 0.2168924 3.8 upper yes yes 28
## 14 no 49 male more -0.2586962 3.4 upper no yes 30
## 15 no 37 female more 0.5502878 2.9 upper yes yes 23
## 16 no 45 male more -0.0620358 4.5 upper yes yes 23
## 17 no 56 female more -0.9823852 4.0 upper yes no 27
## 18 no 48 male more -0.0543440 3.8 lower yes no 100
## 19 no 46 female more -0.0680143 4.3 upper yes yes 25
## 20 no 57 female more 0.0294137 3.4 upper yes no 17
## 21 no 52 female more 0.2394859 3.4 upper yes no 19
## 22 yes 29 female more -0.8487269 3.3 upper no yes 19
## 23 no 62 male more -0.7330914 4.3 upper yes yes 30
## 24 no 64 male more -0.1111221 4.4 upper yes yes 15
## 25 no 34 female more 1.7755170 4.6 upper yes yes 20
## 26 no 58 male more -0.3218485 4.2 upper yes yes 84
## 27 yes 52 male more 0.2116939 4.0 upper no yes 13
## 28 no 73 male more -0.7176450 3.3 upper yes yes 12
## 29 no 70 male more -0.7326927 4.4 upper yes yes 47
## 30 no 41 female more 0.4081676 2.3 upper yes yes 10
## 31 no 63 male more -0.0102077 3.5 upper yes no 28
## 32 no 47 male more -0.9239570 4.7 upper yes yes 10
## 33 no 39 male more 0.5766805 3.9 lower yes yes 86
## 34 yes 47 female more -0.0836015 4.0 lower yes yes 21
## 35 no 54 male more -1.0795580 4.3 upper yes yes 15
## 36 yes 44 female more 1.0409020 3.8 upper yes yes 30
## 37 yes 47 male more -1.0521080 3.8 upper yes yes 20
## 38 no 62 male more -0.7277681 4.0 upper yes yes 12
## 39 no 60 male more -0.3953965 4.6 upper yes yes 25
## 40 no 37 male more 0.9333959 3.5 upper yes yes 15
## 41 no 42 male more -0.2377786 4.7 upper yes yes 13
## 42 no 35 male more 0.2749080 4.2 upper yes yes 42
## 43 no 39 female more 1.9700230 3.4 lower yes no 22
## 44 no 49 male more 1.0509500 3.9 upper yes yes 28
## 45 no 61 male more 0.2418185 4.5 lower yes yes 22
## 46 no 33 male more 1.3493950 4.7 upper yes yes 30
## 47 no 58 female more 0.1115635 3.5 upper yes yes 26
## 48 no 56 female more -0.2577254 3.7 upper yes yes 12
## 49 no 50 female more -0.6562689 4.0 lower yes no 22
## 50 no 52 male more -0.6563948 4.1 upper yes yes 57
## 51 no 33 female more 0.7244775 4.4 upper yes yes 10
## 52 no 57 male more 0.6318343 4.2 upper yes yes 69
## 53 no 38 female more 1.0709440 4.5 upper yes yes 46
## 54 no 34 female more -1.4504940 3.8 lower yes yes 54
## 55 no 34 male more 1.1558800 3.1 upper yes yes 24
## 56 no 32 male more -0.3260148 3.7 lower yes yes 85
## 57 no 42 female more 0.8846435 3.9 lower yes yes 44
## 58 no 43 female more -0.5583452 4.0 lower yes yes 35
## 59 no 35 male more -0.3415543 3.3 upper no yes 11
## 60 no 62 female more -0.5040575 3.1 upper yes yes 22
## 61 no 42 male more -0.9005804 4.0 upper yes yes 45
## 62 no 39 male more 0.6430142 4.3 upper yes yes 22
## 63 no 52 female more 0.7735240 3.7 upper yes yes 64
## 64 no 52 female more 1.0639380 3.4 upper yes yes 31
## 65 no 52 female more -1.0903890 4.3 upper yes no 59
## 66 no 64 male more -1.0691620 3.7 upper yes yes 9
## 67 no 50 male more 1.4156950 4.2 upper yes yes 15
## 68 no 60 male more -1.4229190 2.2 upper yes yes 23
## 69 no 51 female more 0.3918222 3.0 upper yes yes 47
## 70 no 43 male more -0.4899626 4.3 lower yes yes 19
## 71 yes 50 male single -0.5835869 4.6 lower yes no 17
## 72 no 52 male more 0.7566829 3.5 upper yes yes 46
## 73 no 51 male more 0.8808186 4.6 lower yes yes 348
## 74 no 38 male more -0.5665014 3.7 lower yes yes 44
## 75 no 47 female more 0.3394037 3.8 lower yes yes 19
## 76 yes 43 female more -0.1513687 3.6 lower yes yes 47
## 77 no 38 female more -1.0249970 4.4 lower yes no 33
## 78 no 43 male more -0.0252444 4.1 lower yes yes 10
## 79 no 57 male more -0.7467875 4.3 upper yes yes 7
## 80 no 51 female more 0.9889485 4.0 upper yes yes 9
## 81 no 45 male single -0.5324199 4.8 lower yes no 12
## 82 no 57 male more -0.7668921 3.5 lower yes yes 13
## 83 no 47 female more 1.1542560 3.6 lower yes no 16
## 84 yes 54 female more 1.2326020 3.8 lower yes yes 18
## 85 no 58 male more 1.7743340 4.7 lower yes no 16
## 86 no 42 male more 1.7731510 4.9 lower yes yes 15
## 87 no 33 male more 0.7245926 4.3 lower yes yes 85
## 88 no 62 male more -1.1816260 3.3 lower yes yes 11
## 89 yes 35 female more 1.7694520 3.4 lower yes yes 60
## 90 no 61 male more -0.5872612 3.6 lower yes yes 27
## 91 no 52 female more -0.0018324 4.0 lower yes yes 61
## 92 no 60 female more -0.0566766 3.9 upper no yes 23
## 93 no 32 male more 1.2313940 4.3 lower yes yes 98
## 94 yes 42 female more 0.4203998 3.3 upper no yes 48
## 95 yes 36 female more 0.2899157 3.7 upper yes yes 86
## 96 yes 36 female more 0.2899157 3.6 upper yes yes 76
## 97 yes 36 female more 0.2899157 4.4 upper yes yes 77
## 98 no 59 male more -0.7377322 4.0 upper yes yes 35
## 99 no 59 male more -0.7377322 2.1 upper yes yes 39
## 100 no 51 male more -0.5719836 3.2 upper yes yes 111
## 101 no 40 female more -0.6779634 3.5 upper yes yes 24
## 102 no 40 female more -0.6779634 4.1 upper yes yes 24
## 103 no 40 female more -0.6779634 4.6 upper yes yes 17
## 104 no 40 female more -0.6779634 3.8 upper yes yes 14
## 105 no 40 female more -0.6779634 3.8 upper yes yes 37
## 106 no 40 female more -0.6779634 3.8 upper yes yes 18
## 107 no 40 female more -0.6779634 4.2 upper yes yes 15
## 108 no 31 female more 1.5097940 3.9 upper yes yes 40
## 109 no 31 female more 1.5097940 4.5 upper yes yes 38
## 110 no 31 female more 1.5097940 4.5 upper yes yes 40
## 111 no 31 female more 1.5097940 4.4 upper yes yes 52
## 112 no 31 female more 1.5097940 4.4 upper yes yes 49
## 113 no 62 male more 0.5885687 4.4 upper yes yes 160
## 114 no 62 male more 0.5885687 4.5 upper yes yes 79
## 115 no 62 male more 0.5885687 4.3 upper yes yes 176
## 116 no 62 male more 0.5885687 4.6 upper yes yes 155
## 117 no 62 male more 0.5885687 4.8 upper yes yes 166
## 118 no 62 male more 0.5885687 4.3 upper yes yes 186
## 119 no 33 female more -0.1260010 4.0 upper yes yes 29
## 120 no 33 female more -0.1260010 4.0 upper yes yes 37
## 121 no 33 female more -0.1260010 3.9 upper yes yes 29
## 122 no 33 female more -0.1260010 3.3 upper yes yes 28
## 123 no 51 female more -0.2581899 4.5 upper yes yes 21
## 124 no 51 female more -0.2581899 4.5 upper yes yes 13
## 125 no 51 female more -0.2581899 4.5 upper yes yes 16
## 126 no 51 female more -0.2581899 2.5 lower yes yes 24
## 127 no 51 female more -0.2581899 4.3 upper yes yes 23
## 128 no 51 female more -0.2581899 4.5 upper yes yes 20
## 129 no 33 female more 0.1496926 4.7 upper yes yes 29
## 130 no 33 female more 0.1496926 3.5 upper yes yes 11
## 131 no 33 female more 0.1496926 4.5 upper yes yes 29
## 132 no 33 female more 0.1496926 3.8 upper yes yes 25
## 133 no 33 female more 0.1496926 4.5 upper yes yes 42
## 134 no 33 female more 0.1496926 4.3 upper yes yes 34
## 135 no 47 male more 0.5409170 3.9 upper yes no 12
## 136 no 47 male more 0.5409170 4.3 upper yes no 14
## 137 no 47 male more 0.5409170 4.2 upper yes no 22
## 138 no 47 male more 0.5409170 5.0 lower yes no 10
## 139 no 47 male more 0.5409170 5.0 lower yes no 17
## 140 no 47 male more 0.5409170 4.6 upper yes no 16
## 141 no 47 male more 0.5409170 5.0 lower yes no 15
## 142 no 47 male more 0.5409170 4.7 upper yes no 16
## 143 no 47 male more 0.5409170 5.0 lower yes no 16
## 144 yes 35 male more 0.2316134 2.7 upper no yes 30
## 145 yes 35 male more 0.2316134 4.0 upper no yes 23
## 146 no 37 male more -0.0666737 4.4 upper yes no 13
## 147 no 37 male more -0.0666737 4.4 upper yes no 24
## 148 no 37 male more -0.0666737 4.3 upper yes no 24
## 149 no 37 male more -0.0666737 3.5 upper yes no 25
## 150 no 42 male more 0.2168924 3.8 upper yes yes 18
## 151 no 42 male more 0.2168924 3.9 upper yes yes 28
## 152 no 42 male more 0.2168924 3.7 upper yes yes 25
## 153 no 42 male more 0.2168924 3.3 upper yes yes 40
## 154 no 42 male more 0.2168924 4.0 upper yes yes 40
## 155 no 42 male more 0.2168924 3.8 upper yes yes 18
## 156 no 49 male more -0.2586962 4.2 upper no yes 31
## 157 no 49 male more -0.2586962 3.1 upper no yes 15
## 158 no 49 male more -0.2586962 3.6 upper no yes 23
## 159 no 37 female more 0.5502878 3.3 upper yes yes 34
## 160 no 37 female more 0.5502878 2.9 upper yes yes 21
## 161 no 37 female more 0.5502878 3.1 upper yes yes 29
## 162 no 45 male more -0.0620358 4.0 lower yes yes 45
## 163 no 45 male more -0.0620358 4.0 lower yes yes 90
## 164 no 45 male more -0.0620358 4.2 upper yes yes 27
## 165 no 45 male more -0.0620358 3.8 upper yes yes 35
## 166 no 45 male more -0.0620358 4.3 lower yes yes 120
## 167 no 56 female more -0.9823852 4.6 upper yes no 39
## 168 no 56 female more -0.9823852 4.3 upper yes no 35
## 169 no 56 female more -0.9823852 3.6 upper yes no 34
## 170 no 56 female more -0.9823852 4.2 upper yes no 27
## 171 no 48 male more -0.0543440 3.9 upper yes no 20
## 172 no 48 male more -0.0543440 4.1 upper yes no 14
## 173 no 48 male more -0.0543440 4.0 lower yes no 65
## 174 no 48 male more -0.0543440 4.3 lower yes no 95
## 175 no 48 male more -0.0543440 3.9 upper yes no 18
## 176 no 48 male more -0.0543440 4.2 lower yes no 85
## 177 no 48 male more -0.0543440 4.2 lower yes no 113
## 178 no 46 female more -0.0680143 4.9 lower yes yes 14
## 179 no 46 female more -0.0680143 4.0 upper yes yes 23
## 180 no 46 female more -0.0680143 4.3 upper yes yes 23
## 181 no 46 female more -0.0680143 4.9 upper yes yes 9
## 182 no 46 female more -0.0680143 3.9 upper yes yes 30
## 183 no 46 female more -0.0680143 4.9 lower yes yes 15
## 184 no 46 female more -0.0680143 3.9 upper yes yes 31
## 185 no 46 female more -0.0680143 4.0 lower yes yes 12
## 186 no 57 female more 0.0294137 3.5 upper yes no 10
## 187 no 57 female more 0.0294137 3.9 upper yes no 15
## 188 no 57 female more 0.0294137 4.0 upper yes no 7
## 189 no 57 female more 0.0294137 3.6 upper yes no 7
## 190 no 57 female more 0.0294137 3.0 upper yes no 14
## 191 no 57 female more 0.0294137 3.0 upper yes no 8
## 192 no 57 female more 0.0294137 3.6 upper yes no 17
## 193 no 57 female more 0.0294137 3.6 upper yes no 10
## 194 no 57 female more 0.0294137 3.2 upper yes no 12
## 195 no 52 female more 0.2394859 3.9 upper yes no 27
## 196 no 52 female more 0.2394859 3.5 upper yes no 20
## 197 no 52 female more 0.2394859 3.5 upper yes no 31
## 198 no 52 female single 0.2394859 3.1 upper yes no 17
## 199 no 52 female more 0.2394859 4.2 upper yes no 23
## 200 no 62 male more -0.7330914 3.6 lower yes yes 94
## 201 no 62 male more -0.7330914 4.5 upper yes yes 46
## 202 no 62 male more -0.7330914 3.7 lower yes yes 80
## 203 no 62 male more -0.7330914 3.4 lower yes yes 61
## 204 no 64 male more -0.1111221 4.5 upper yes yes 51
## 205 no 64 male more -0.1111221 4.6 upper yes yes 22
## 206 no 64 male more -0.1111221 4.8 upper yes yes 10
## 207 no 64 male more -0.1111221 4.5 upper yes yes 11
## 208 no 64 male more -0.1111221 4.4 upper yes yes 15
## 209 no 64 male more -0.1111221 4.1 upper yes yes 21
## 210 no 34 female more 1.7755170 3.9 upper yes yes 33
## 211 no 58 male more -0.3218485 4.3 upper yes yes 71
## 212 no 58 male more -0.3218485 3.5 lower yes yes 36
## 213 no 58 male more -0.3218485 4.0 upper yes yes 73
## 214 no 58 male more -0.3218485 4.0 lower yes yes 31
## 215 yes 52 male more 0.2116939 4.6 upper no yes 23
## 216 yes 52 male more 0.2116939 4.6 upper no yes 12
## 217 yes 52 male more 0.2116939 3.7 upper no yes 15
## 218 yes 52 male more 0.2116939 3.5 upper no yes 11
## 219 yes 52 male more 0.2116939 3.6 upper no yes 12
## 220 yes 52 male more 0.2116939 3.9 upper no yes 18
## 221 no 73 male more -0.7176450 4.2 upper yes yes 10
## 222 no 73 male more -0.7176450 3.2 upper yes yes 16
## 223 no 73 male more -0.7176450 4.9 upper yes yes 13
## 224 no 70 male more -0.7326927 4.0 upper yes yes 5
## 225 no 70 male more -0.7326927 3.5 upper yes yes 34
## 226 no 70 male more -0.7326927 3.4 upper yes yes 24
## 227 no 63 male more -0.0102077 4.2 upper yes no 11
## 228 no 63 male more -0.0102077 3.5 upper yes no 10
## 229 no 63 male more -0.0102077 4.4 upper yes no 14
## 230 no 63 male more -0.0102077 3.7 upper yes no 12
## 231 no 63 male more -0.0102077 3.4 upper yes no 8
## 232 no 63 male more -0.0102077 3.0 upper yes no 23
## 233 no 47 male more -0.9239570 3.9 upper yes yes 10
## 234 no 47 male more -0.9239570 2.8 upper yes yes 10
## 235 no 39 male more 0.5766805 3.7 lower yes yes 154
## 236 no 39 male more 0.5766805 4.6 upper yes yes 12
## 237 no 39 male more 0.5766805 4.2 upper yes yes 14
## 238 no 39 male more 0.5766805 4.4 upper yes yes 27
## 239 yes 47 female more -0.0836015 3.8 upper yes yes 8
## 240 yes 47 female single -0.0836015 4.1 lower yes yes 16
## 241 yes 47 female more -0.0836015 3.7 lower yes yes 24
## 242 yes 47 female more -0.0836015 4.1 upper yes yes 7
## 243 yes 47 female more -0.0836015 3.0 lower yes yes 25
## 244 yes 47 female more -0.0836015 3.2 lower yes yes 24
## 245 yes 47 female more -0.0836015 2.8 lower yes yes 24
## 246 yes 47 female single -0.0836015 4.7 lower yes yes 20
## 247 yes 47 female more -0.0836015 4.2 lower yes yes 12
## 248 yes 47 female more -0.0836015 3.2 lower yes yes 25
## 249 yes 47 female more -0.0836015 3.1 lower yes yes 26
## 250 yes 47 female more -0.0836015 4.0 lower yes yes 24
## 251 no 54 male more -1.0795580 4.2 upper yes yes 10
## 252 no 54 male more -1.0795580 4.3 upper yes yes 16
## 253 yes 44 female more 1.0409020 3.3 upper yes yes 35
## 254 yes 44 female more 1.0409020 4.1 upper yes yes 21
## 255 yes 44 female more 1.0409020 3.7 upper yes yes 35
## 256 yes 47 male more -1.0521080 3.3 upper yes yes 9
## 257 yes 47 male more -1.0521080 3.8 upper yes yes 21
## 258 yes 47 male more -1.0521080 3.4 upper yes yes 13
## 259 yes 47 male more -1.0521080 4.2 upper yes yes 13
## 260 yes 47 male more -1.0521080 3.8 upper yes yes 12
## 261 yes 47 male more -1.0521080 3.5 upper yes yes 14
## 262 yes 47 male more -1.0521080 3.3 upper yes yes 15
## 263 no 62 male more -0.7277681 4.3 upper yes yes 13
## 264 no 62 male more -0.7277681 4.1 upper yes yes 7
## 265 no 60 male more -0.3953965 4.5 upper yes yes 12
## 266 no 60 male more -0.3953965 4.5 upper yes yes 11
## 267 no 60 male more -0.3953965 4.6 upper yes yes 8
## 268 no 60 male more -0.3953965 4.4 upper yes yes 24
## 269 no 60 male more -0.3953965 4.1 upper yes yes 15
## 270 no 60 male more -0.3953965 4.5 upper yes yes 31
## 271 no 60 male more -0.3953965 4.3 lower yes yes 36
## 272 no 42 male more -0.2377786 4.4 upper yes yes 14
## 273 no 42 male more -0.2377786 4.9 upper yes yes 13
## 274 no 42 male more -0.2377786 4.7 upper yes yes 12
## 275 no 42 male more -0.2377786 4.6 upper yes yes 13
## 276 no 35 male more 0.2749080 4.8 lower yes yes 21
## 277 no 35 male more 0.2749080 4.2 upper yes yes 49
## 278 no 35 male more 0.2749080 4.6 lower yes yes 44
## 279 no 39 female more 1.9700230 4.7 upper yes no 18
## 280 no 39 female more 1.9700230 4.6 upper yes no 20
## 281 no 39 female more 1.9700230 3.6 lower yes no 27
## 282 no 49 male more 1.0509500 3.9 upper yes yes 27
## 283 no 49 male more 1.0509500 4.0 upper yes yes 49
## 284 no 61 male more 0.2418185 4.4 upper yes yes 31
## 285 no 61 male more 0.2418185 4.5 lower yes yes 19
## 286 no 61 male more 0.2418185 4.4 upper yes yes 27
## 287 no 33 male more 1.3493950 3.0 upper yes yes 12
## 288 no 33 male more 1.3493950 3.7 upper yes yes 13
## 289 no 56 female more -0.2577254 3.6 upper yes yes 16
## 290 no 56 female more -0.2577254 3.1 upper yes yes 17
## 291 no 50 female single -0.6562689 3.8 lower yes no 24
## 292 no 50 female single -0.6562689 4.7 lower yes no 14
## 293 no 50 female more -0.6562689 3.8 upper yes no 23
## 294 no 50 female more -0.6562689 3.8 upper yes no 19
## 295 no 50 female more -0.6562689 2.8 upper yes no 18
## 296 no 50 female more -0.6562689 4.0 upper yes no 23
## 297 no 52 male more -0.6563948 4.0 upper yes yes 81
## 298 no 52 male more -0.6563948 3.5 upper yes yes 74
## 299 no 52 male more -0.6563948 3.4 upper yes yes 102
## 300 no 52 male more -0.6563948 4.0 upper yes yes 94
## 301 no 52 male more -0.6563948 3.5 upper yes yes 89
## 302 no 52 male more -0.6563948 3.8 upper yes yes 133
## 303 no 52 male more -0.6563948 4.7 upper yes yes 22
## 304 no 52 male more -0.6563948 3.9 upper yes yes 78
## 305 no 52 male more -0.6563948 4.5 upper yes yes 22
## 306 no 52 male more -0.6563948 4.2 upper yes yes 27
## 307 no 52 male more -0.6563948 4.7 upper yes yes 27
## 308 no 52 male more -0.6563948 4.0 upper yes yes 60
## 309 no 33 female more 0.7244775 4.8 upper yes yes 10
## 310 no 33 female more 0.7244775 4.8 upper yes yes 10
## 311 no 33 female more 0.7244775 4.4 upper yes yes 10
## 312 no 33 female more 0.7244775 4.7 upper yes yes 7
## 313 no 33 female more 0.7244775 4.5 upper yes yes 14
## 314 no 57 male more 0.6318343 4.2 upper yes yes 36
## 315 no 57 male more 0.6318343 4.4 upper yes yes 72
## 316 no 57 male more 0.6318343 4.1 upper yes yes 63
## 317 no 38 female more 1.0709440 4.2 lower yes yes 109
## 318 no 38 female more 1.0709440 4.8 upper yes yes 54
## 319 no 38 female more 1.0709440 4.4 upper yes yes 51
## 320 no 38 female more 1.0709440 4.7 upper yes yes 61
## 321 no 38 female more 1.0709440 4.2 lower yes yes 102
## 322 no 38 female more 1.0709440 4.5 upper yes yes 58
## 323 no 34 female more -1.4504940 3.4 lower yes yes 46
## 324 no 34 female more -1.4504940 3.7 lower yes yes 53
## 325 no 34 female more -1.4504940 3.6 upper yes yes 19
## 326 no 34 female more -1.4504940 3.9 upper yes yes 41
## 327 no 34 female more -1.4504940 3.9 upper yes yes 25
## 328 no 34 male more 1.1558800 3.7 upper yes yes 16
## 329 no 34 male more 1.1558800 3.0 lower yes yes 20
## 330 no 32 male more -0.3260148 3.6 lower yes yes 69
## 331 no 32 male more -0.3260148 3.6 lower yes yes 98
## 332 no 32 male more -0.3260148 4.3 upper yes yes 20
## 333 no 32 male more -0.3260148 4.5 upper yes yes 72
## 334 no 42 female more 0.8846435 3.9 upper yes yes 51
## 335 no 43 female more -0.5583452 4.6 upper yes yes 18
## 336 no 43 female more -0.5583452 4.1 lower yes yes 26
## 337 no 43 female more -0.5583452 4.2 lower yes yes 28
## 338 no 43 female more -0.5583452 4.1 lower yes yes 13
## 339 no 43 female more -0.5583452 3.1 lower yes yes 174
## 340 no 43 female more -0.5583452 3.6 lower yes yes 171
## 341 no 43 female more -0.5583452 4.2 upper yes yes 10
## 342 no 43 female more -0.5583452 3.0 lower yes yes 166
## 343 no 43 female more -0.5583452 4.2 upper yes yes 17
## 344 no 35 male more -0.3415543 3.4 lower no yes 22
## 345 no 62 female more -0.5040575 3.1 upper yes yes 9
## 346 no 62 female more -0.5040575 2.7 upper yes yes 14
## 347 no 52 female more 0.7735240 3.9 upper yes yes 70
## 348 no 52 female more 1.0639380 3.9 upper yes yes 49
## 349 no 52 female more 1.0639380 3.6 upper yes yes 32
## 350 no 52 female more -1.0903890 3.7 upper yes no 35
## 351 no 52 female more -1.0903890 3.6 upper yes no 59
## 352 no 52 female more -1.0903890 4.4 upper yes no 45
## 353 no 52 female more -1.0903890 4.3 upper yes no 34
## 354 no 52 female more -1.0903890 4.1 upper yes no 50
## 355 no 52 female more -1.0903890 3.7 upper yes no 67
## 356 no 64 male more -1.0691620 3.6 upper yes yes 8
## 357 no 64 male more -1.0691620 2.8 upper yes yes 18
## 358 no 64 male more -1.0691620 4.0 upper yes yes 5
## 359 no 64 male more -1.0691620 4.4 upper yes yes 5
## 360 no 64 male more -1.0691620 3.6 upper yes yes 16
## 361 no 50 male more 1.4156950 3.7 upper yes yes 9
## 362 no 60 male more -1.4229190 2.9 upper yes yes 7
## 363 no 60 male more -1.4229190 2.6 upper yes yes 10
##...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here