I have a series of statistics questions that need to be answered. I have run the models, I am just out of time to complete the answers.
Assignment 3: Linear Regression model for CEO compensation Q1. Create a ceo.gender object that contains the column GENDER with command ceo.gender <- ceo.data$gender="" and:="" ·="" calculate="" the="" number="" of="" ceos="" that="" are="" male/female="" by="" applying="" the="" table()="" command="" to="" the="" object="" ·="" calculate="" the="" average="" tdc1="" compensation="" for="" male="" and="" female="" ceos="" and="" discuss="" the="" evidence="" of="" a="" gender="" gap=""> View(ceodata) > av.TDC1<- c(male="mean(ceo.data$TDC1[ceo.gender" =="MALE" ],="" na.rm="T)," +="" female="mean(ceo.data$TDC1[ceo.gender" =="FEMALE" ],="" na.rm="T))" error="" in="" mean(ceo.data$tdc1[ceo.gender="=" "male"],="" na.rm="T)" :="" object="" 'ceo.data'="" not="" found=""> > av.TDC1<- c(male="mean(ceo.data$TDC1[ceo.gender" =="MALE" ],="" na.rm="T)," +="" female="mean(ceo.data$TDC1[ceo.gender" =="FEMALE" ],="" na.rm="T))" error="" in="" mean(ceo.data$tdc1[ceo.gender="=" "male"],="" na.rm="T)" :="" object="" 'ceo.data'="" not="" found=""> View(ceodata) > ceo.gender <- ceo.data$gender="" error:="" object="" 'ceo.data'="" not="" found=""> av.TDC1<- c(male="mean(ceo.data$TDC1[ceo.gender" =="MALE" ],="" na.rm="T)," +="" female="mean(ceo.data$TDC1[ceo.gender" =="FEMALE" ],="" na.rm="T))" error="" in="" mean(ceo.data$tdc1[ceo.gender="=" "male"],="" na.rm="T)" :="" object="" 'ceo.data'="" not="" found=""> View(ceodata) > view(ceodata) > read.excel(ceodata) > View(ceodata) > ceo.gender <- ceodata$gender=""> av.TDC1<- c(male="mean(ceodata$TDC1[ceo.gender" =="MALE" ],="" na.rm="T),FEMALE" =="" mean(ceodata$tdc1[ceo.gender="=" "female"],="" na.rm="T))"> > av.TDC1<- c(male="mean(ceodata$TDC1[ceo.gender" =="MALE" ],="" na.rm="T),FEMALE" =="" mean(ceodata$tdc1[ceo.gender="=" "female"],="" na.rm="T))" ___________________________________________________________________________="" q2.="" estimate="" a="" linear="" regression="" model="" of="" tdc1="" on="" the="" gender="" variable.="" ·="" discuss="" the="" regression="" results="" and="" relate="" them="" to="" the="" findings="" in="" the="" previous="" question="" ·="" is="" the="" gap="" in="" compensation="" between="" male/female="" ceo="" statistically="" significant="" at="" 5%?=""> fit <- lm(tdc1="" ~="" gender,="" data="ceo.data)" error="" in="" is.data.frame(data)="" :="" object="" 'ceo.data'="" not="" found=""> fit <- lm(tdc1="" ~="" gender,="" data="ceodata)"> summary(fit) Call: lm(formula = TDC1 ~ GENDER, data = ceodata) Residuals: Min 1Q Median 3Q Max -7266 -4113 -1809 2344 91218 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7930.4 771.7 10.277<2e-16 ***="" gendermale="" -1136.1="" 789.7="" -1.439="" 0.15="" ---="" signif.="" codes:="" 0="" ‘***’="" 0.001="" ‘**’="" 0.01="" ‘*’="" 0.05="" ‘.’="" 0.1="" ‘="" ’="" 1="" residual="" standard="" error:="" 6683="" on="" 1663="" degrees="" of="" freedom="" multiple="" r-squared:="" 0.001243,="" adjusted="" r-squared:="" 0.0006426="" f-statistic:="" 2.07="" on="" 1="" and="" 1663="" df,="" p-value:="" 0.1504="" ___________________________________________________________________________="" q3.="" estimate="" a="" linear="" regression="" model="" of="" tdc1="" on="" gender="" and="" mktval="" and="" then="" estimate="" another="" regression="" model="" with="" the="" logarithm="" of="" mktval.="" ·="" discuss="" the="" effect="" of="" mktval="" on="" tdc1="" in="" both="" regressions="" ·="" which="" model="" fits="" best="" the="" data?=""> fit.linlin <- lm(tdc1="" ~="" gender="" +="" mktval,="" data="ceo.data)fit.linlog">-><- lm(tdc1="" ~="" gender="" +="" log(mktval),="" data="ceo.data)"> fit.linlin <- lm(tdc1="" ~="" gender="" +="" mktval,="" data=")fit.linlog">-><- lm(tdc1="" ~="" gender="" +="" log(mktval),="" data="ceodata)"> fit.linlin <- lm(tdc1="" ~="" gender="" +="" mktval,="" data="ceodata)"> fit.linlog <- lm(tdc1="" ~="" gender="" +="" log(mktval),="" data="ceodata)" __________________________________________________________________________="" q4.="" use="" the="" previous="" regression="" model="" with="" gender="" and="" log(mktval)="" and="" add="" age="" and="" then="" age="" and="" its="" square.="" ·="" does="" the="" fit="" of="" the="" regression="" model="" improve="" by="" adding="" age="" or="" age="" and="" its="" square?="" ·="" are="" older="" ceos="" compensated="" more="" and="" by="" how="" much?="" does="" the="" relationship="" of="" compensation="" and="" age="" depend="" on="" the="" age="" itself?=""> fit.linlog.age<- lm(tdc1="" ~="" gender="" +="" log(mktval)="" +="" age,="" data="ceodata)"> fit.linlog.agesq <- lm(tdc1="" ~="" gender="" +="" log(mktval)="" +="" age="" +="" i(age^2),="" data="ceodata)" ___________________________________________________________________________q5.="" estimate="" the="" previous="" regression="" for="" the="" logarithm="" of="" tdc1="" instead="" of="" tdc1.="" since="" there="" are="" 4="" cases="" in="" which="" ceos="" do="" not="" receive="" any="" compensation="" (that="" is,="" tdc1="0)," the="" lm()="" function="" generates="" an="" error="" if="" these="" values="" are="" not="" eliminated="" prior="" to="" estimating="" the="" model.="" ·="" provide="" an="" interpretation="" of="" the="" effect="" of="" mktval="" and="" age="" in="" this="" regression="" ·="" do="" you="" prefer="" the="" model="" for="" tdc1="" or="" log(tdc1)?=""> fit.loglog.agesq <- lm(log(tdc1)="" ~="" gender="" +="" log(mktval)="" +="" age="" +="" i(age^2),data="subset(ceodata," tdc1=""> 0)) > summary(fit.loglog.agesq) Call: lm(formula = log(TDC1) ~ GENDER + log(MKTVAL) + AGE + I(AGE^2), data = subset(ceodata, TDC1 > 0)) Residuals: Min 1Q Median 3Q Max -16.8835 -0.2702 0.0850 0.3944 2.4107 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.4705413 0.8905449 1.651 0.0989 . GENDERMALE -0.1167102 0.1059792 -1.101 0.2709 log(MKTVAL) 0.3453877 0.0131539 26.257< 2e-16="" ***="" age="" 0.1516342="" 0.0306128="" 4.953="" 8.06e-07="" ***="" i(age^2)="" -0.0013149="" 0.0002631="" -4.997="" 6.44e-07="" ***="" ---="" signif.="" codes:="" 0="" ‘***’="" 0.001="" ‘**’="" 0.01="" ‘*’="" 0.05="" ‘.’="" 0.1="" ‘="" ’="" 1="" residual="" standard="" error:="" 0.8844="" on="" 1623="" degrees="" of="" freedom="" (33="" observations="" deleted="" due="" to="" missingness)="" multiple="" r-squared:="" 0.3153,="" adjusted="" r-squared:="" 0.3136="" f-statistic:="" 186.8="" on="" 4="" and="" 1623="" df,="" p-value:="">< 2.2e-16 ___________________________________________________________________________ 2.2e-16=""> 2.2e-16 ___________________________________________________________________________>->->->->->->->2e-16>->->->->->->->->->->