Unit of My Assignment Services

# Advanced Quantitative Methods - Analysis of Correlates of School Performance

Download Solution Now
# 1. Explore the use of logarithms of the dependent variable. calschool\$log_dependent variable &lt;- log(calschool\$dependent variable) regression_log &lt;- 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 &lt; 50.25] &lt;- 0 calschool\$ell_cat[calschool\$ell &gt;= 50.25] &lt;- 1 calschool\$ell_cat &lt;- 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 &lt;- ifelse(calschool\$mealcat == 3, 1, 0) calschool\$med_mealcat &lt;- ifelse(calschool\$mealcat == 2, 1, 0) calschool\$low_mealcat &lt;- 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 &lt;- 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(&quot;stargazer&quot;) install.packages(&quot;lmtest&quot;) install.packages(&quot;corrplot&quot;) 12 install.packages(&quot;sjPlot&quot;) library(stargazer) library(lmtest) library(corrplot) library(sjPlot) #Then, run this code: # Correlation Matrix Visualization corrmatrix &lt;- cor(calschool, use = &quot;complete.obs&quot;) View(corrmatrix) corrplot(corrmatrix, method=&quot;circle&quot;) # 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=&quot;lower&quot;) #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 = &quot;Estimate&quot;, string.ci = &quot;Conf. Int.&quot;, string.dv = &quot;Unadjusted Regression Model&quot;, depvar.labels = c(&quot; % Free Meals&quot;), pred.labels = c(&quot;School wide Academic Performance&quot;)) #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 = &quot;Estimate&quot;, 13 string.ci = &quot;Conf. Int.&quot;, string.dv = &quot;Adjusted Regression Model&quot;, depvar.labels = c(&quot;% Free Meals&quot;), pred.labels = c(&quot;School Wide Academic Performance&quot;, &quot;% English learners&quot;, &quot;% teachers with full credentials&quot;)) #Showing the unadjusted (first model) and adjusted regression (final model) results side by side #stargazer package stargazer(regression_1, regression_final, title=&quot;Regression Results&quot;, dep.var.labels=c(&quot;% Free Meals&quot;), type=&quot;text&quot;) #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 = &quot;Estimate&quot;, string.ci = &quot;Conf. Int.&quot;, string.dv = &quot;Regression Results&quot;, depvar.labels = c(&quot;Unadjusted Regression Model&quot;, &quot;Adjusted Regression Model&quot;), pred.labels = c(&quot;School Wide Academic Performance&quot;, &quot;% English Learners&quot;, &quot;% teachers with full credentials&quot;))
• Uploaded By : Admin
• Posted on : July 10th, 2017
• Downloads : 0

## Download Solution Now ### Review Question

Please enter your email

# 40 USD

• All in Gold, plus:
• 30-minute live one-to-one session with an expert
• Understanding Marking Rubric
• Understanding task requirements
• Structuring & Formatting
• Referencing & Citing
Most
Popular

# 2015 USD

• Get Full Solution
(Solution is already submitted and 100% plagiarised.
Can only be used for reference purposes)
Save 25%

# 10 USD

• Journals
• Peer-Reviewed Articles
• Books
• Various other Data Sources – ProQuest, Informit, Scopus, Academic Search Complete, EBSCO, Exerpta Medica Database, and more