library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.1 ✔ tibble 3.2.1
## ✔ lubridate 1.9.3 ✔ tidyr 1.3.1
## ✔ purrr 1.0.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(readxl)
data<-read_excel("district.xls")
model1<-lm(DA0AT21R~DPETLEPP+DPETGIFP,data=data)
summary(model1)
##
## Call:
## lm(formula = DA0AT21R ~ DPETLEPP + DPETGIFP, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -96.189 -0.711 0.586 1.656 5.724
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 94.260072 0.241673 390.031 < 2e-16 ***
## DPETLEPP 0.002292 0.009578 0.239 0.81092
## DPETGIFP 0.083692 0.026795 3.123 0.00183 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.85 on 1200 degrees of freedom
## (4 observations deleted due to missingness)
## Multiple R-squared: 0.008074, Adjusted R-squared: 0.006421
## F-statistic: 4.884 on 2 and 1200 DF, p-value: 0.00772
Question 5) The overall model explains that the dependent variable is effected by the number of gifted and talented students. The significant variable is DPETGIFP The insignificant varaibles is DPETLEPP Question 6) When the number of gifted and talented students increase in the district so do the various assessment scores or performance indicators for the year. Question 7)Violates the assumption of linearity
plot(model1, which = 1)
This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.