Urgenthomework logo
UrgentHomeWork
Live chat

Loading..

Advanced Quantitative Methods - Assessment Answer

# 1. Explore the use of logarithms of the dependent variable.

calschool$log_dependent variable <- log(calschool$dependent variable)

regression_log <- lm(log_dependent variable ~ independent variable(s), data =

calschool)

summary(regression_log)

# 2. Convert a continuous variable into a nominal / ordinal variables

quantile(calschool$ell, 0.75, na.rm = TRUE) # find the value of ell at 75%, we set

this value as the cutoff.

calschool$ell_cat[calschool$ell < 50.25] <- 0

calschool$ell_cat[calschool$ell >= 50.25] <- 1

calschool$ell_cat <- factor(calschool$ell_cat) # make ell_cat as a dummy

variable that only has value 1 and 0.

# Create a dummy variable for mealcat

calschool$high_mealcat <- ifelse(calschool$mealcat == 3, 1, 0)

calschool$med_mealcat <- ifelse(calschool$mealcat == 2, 1, 0)

calschool$low_mealcat <- ifelse(calschool$mealcat == 1, 1, 0)

# 3. Create an interaction variable of dummy variables, just multiply these two

dummy variable ell_cat*high_mealcat.

regression_interaction_high <- lm(dependent variable ~ ell_cat*high_mealcat,

data = calschool)

summary(regression_interaction_high)

#4 Visualization extension: For students who would like to experiment with

improved visualizations

#First, we will need to install some new packages:

install.packages("stargazer")

install.packages("lmtest")

install.packages("corrplot")

12

install.packages("sjPlot")

library(stargazer)

library(lmtest)

library(corrplot)

library(sjPlot)

#Then, run this code:

# Correlation Matrix Visualization

corrmatrix <- cor(calschool, use = "complete.obs")

View(corrmatrix)

corrplot(corrmatrix, method="circle") # correlation_table_calschool is the name of

the correlation matrix we created above

corrplot.mixed(corrmatrix, number.cex = 0.8, tl.cex = 0.6)

#number.cex changes the size of the number fonts. tl.cex changes the size of the

labels

corrplot(corrmatrix, type="lower")

#Here is some code to improve the formatting of your regression results

#Here is the unadjusted regression model (first model that only has independent

variable) output using the `sjPlot` package.

sjt.lm(regression_1,

show.header = TRUE,

p.numeric = FALSE,

show.se = TRUE,

show.fstat = TRUE,

string.est = "Estimate",

string.ci = "Conf. Int.",

string.dv = "Unadjusted Regression Model",

depvar.labels = c(" % Free Meals"),

pred.labels = c("School wide Academic Performance"))

#Here is the adjusted regression model output using the `sjPlot` package.

sjt.lm(regression_final,

show.header = TRUE,

p.numeric = FALSE,

show.se = TRUE,

digits.se = 3,

show.fstat = TRUE,

string.est = "Estimate",

13

string.ci = "Conf. Int.",

string.dv = "Adjusted Regression Model",

depvar.labels = c("% Free Meals"),

pred.labels = c("School Wide Academic Performance", "% English learners",

"% teachers with full credentials"))

#Showing the unadjusted (first model) and adjusted regression (final model)

results side by side

#stargazer package

stargazer(regression_1, regression_final, title="Regression Results",

dep.var.labels=c("% Free Meals"), type="text")

#sjPlot package:

sjt.lm(regression_1, regression_final,

show.header = TRUE,

p.numeric = FALSE,

show.se = TRUE,

digits.se = 3,

show.fstat = TRUE,

group.pred = FALSE,

string.est = "Estimate",

string.ci = "Conf. Int.",

string.dv = "Regression Results",

depvar.labels = c("Unadjusted Regression Model", "Adjusted Regression

Model"),

pred.labels = c("School Wide Academic Performance", "% English

Learners",

"% teachers with full credentials"))


Buy Advanced Quantitative Methods - Assessment Answer Online


Talk to our expert to get the help with Advanced Quantitative Methods - Assessment Answers to complete your assessment on time and boost your grades now

The main aim/motive of the management assignment help services is to get connect with a greater number of students, and effectively help, and support them in getting completing their assignments the students also get find this a wonderful opportunity where they could effectively learn more about their topics, as the experts also have the best team members with them in which all the members effectively support each other to get complete their diploma assignments. They complete the assessments of the students in an appropriate manner and deliver them back to the students before the due date of the assignment so that the students could timely submit this, and can score higher marks. The experts of the assignment help services at urgenthomework.com are so much skilled, capable, talented, and experienced in their field of programming homework help writing assignments, so, for this, they can effectively write the best economics assignment help services.

Get Online Support for Advanced Quantitative Methods - Assessment Answer Assignment Help Online

Resources

    • 24 x 7 Availability.
    • Trained and Certified Experts.
    • Deadline Guaranteed.
    • Plagiarism Free.
    • Privacy Guaranteed.
    • Free download.
    • Online help for all project.
    • Homework Help Services
); }
Copyright © 2009-2023 UrgentHomework.com, All right reserved.