library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.2.1     ✔ readr     2.2.0
## ✔ forcats   1.0.1     ✔ stringr   1.6.0
## ✔ ggplot2   4.0.3     ✔ tibble    3.3.1
## ✔ lubridate 1.9.5     ✔ tidyr     1.3.2
## ✔ purrr     1.2.2     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(ggplot2)
library(readxl)

district <- read_excel("district.xls")

Variable Selection:

Dependent Variable: DA0CC23R College Admissions: At/Above Criterion

Independent Variable(s): DPSTKIDR - # Students Per Teacher, DPSTURNR - Teacher Turnover Rate, DPFPAREGP - % of Basic Education Service, DPSTTOSA - Average Teacher Salary

district_data <- lm(DA0CC23R~DPSTTOSA+DPSTKIDR+DPSTURNR+DPFPAREGP,data=district)
summary(district_data)
## 
## Call:
## lm(formula = DA0CC23R ~ DPSTTOSA + DPSTKIDR + DPSTURNR + DPFPAREGP, 
##     data = district)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -46.601 -10.985  -1.703   8.577  57.955 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -6.219e+00  5.080e+00  -1.224   0.2212    
## DPSTTOSA     1.874e-04  8.244e-05   2.273   0.0232 *  
## DPSTKIDR    -1.091e-02  8.334e-02  -0.131   0.8959    
## DPSTURNR    -3.809e-01  4.934e-02  -7.719 2.69e-14 ***
## DPFPAREGP    7.258e-01  6.048e-02  12.000  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 14.95 on 1065 degrees of freedom
##   (137 observations deleted due to missingness)
## Multiple R-squared:  0.1902, Adjusted R-squared:  0.1872 
## F-statistic: 62.53 on 4 and 1065 DF,  p-value: < 2.2e-16

The model explains how much my dependent variable is related to indepedent variables. This model has a r-squared value of 0.1902, which explain the affect of the independent variables at 19.02% of variation to the dependent variable.

Significant p-values in variables are DPSTTOSA (Average Teacher Salary) p=0.0232; DPSTURNR (Teacher Turnover Rate) p=2.69x10^(-14), and DPFPAREGP (% of Basic Education Service) p=2x10^(-16).

% of Basic Education Service has the high statistically significant positive relation with College Admissions: % At/Above Cierion. Average Teacher Salary has a statistically significant positive relationship with College Admissions: % At/Above Crierion. Teacher Turnover Rate has a high statistical significance and a negative relationship with College Admissions: At/Above Crierion.

Lesser significant p-values in variables are DPSTKIDR (# Students Per Teacher) p=0.8959 with an estimate of -0.01091. This means the # of students per teacher less of a relationship than the other variables controlled.

plot(district_data,which=1)