Project-1

.pdf

School

Foothill College *

*We aren’t endorsed by this school

Course

103

Subject

Statistics

Date

Jan 9, 2024

Type

pdf

Pages

10

Uploaded by ElderFreedomSeahorse

Report
Project 1 | Group 76 Joey Liu, Noemi Loera, Dale Kim 2023-10-15 library (AER) ## Loading required package: car ## Loading required package: carData ## Loading required package: lmtest ## Loading required package: zoo ## ## Attaching package: ’zoo’ ## The following objects are masked from ’package:base’: ## ## as.Date, as.Date.numeric ## Loading required package: sandwich ## Loading required package: survival data ( "MurderRates" ) summary (MurderRates $ income) ## Min. 1st Qu. Median Mean 3rd Qu. Max. ## 0.760 1.550 1.830 1.781 2.070 2.390 library (lmtest) library (leaps) library (HH) ## Loading required package: lattice ## Loading required package: grid ## Loading required package: latticeExtra 1
## Loading required package: multcomp ## Loading required package: mvtnorm ## Loading required package: TH.data ## Loading required package: MASS ## ## Attaching package: ’TH.data’ ## The following object is masked from ’package:MASS’: ## ## geyser ## Loading required package: gridExtra ## ## Attaching package: ’HH’ ## The following objects are masked from ’package:car’: ## ## logit, vif summary (MurderRates $ income) ## Min. 1st Qu. Median Mean 3rd Qu. Max. ## 0.760 1.550 1.830 1.781 2.070 2.390 hist (MurderRates $ income, main = "Income Histogram" ) 2
Income Histogram MurderRates$income Frequency 1.0 1.5 2.0 0 2 4 6 8 10 boxplot (MurderRates $ income) 3
1.0 1.5 2.0 5 regsub <- regsubsets (rate ~ ., method = "exhaustive" , nbest = 2 , data = MurderRates) summaryHH (regsub) ## model p rsq rss adjr2 cp bic stderr ## 1 s 2 0.588 353 0.578 18.40 -31.4 2.90 ## 2 n 2 0.560 377 0.550 22.27 -28.6 2.99 ## 3 n-s 3 0.675 278 0.659 8.01 -38.1 2.61 ## 4 t-n 3 0.641 308 0.623 12.88 -33.7 2.74 ## 5 t-n-s 4 0.705 253 0.683 5.81 -38.6 2.51 ## 6 c-n-s 4 0.698 259 0.675 6.84 -37.5 2.54 ## 7 c-t-n-s 5 0.729 232 0.701 4.43 -38.5 2.44 ## 8 t-i-n-s 5 0.711 247 0.682 6.89 -35.8 2.52 ## 9 c-t-i-n-s 6 0.736 226 0.701 5.38 -35.9 2.44 ## 10 c-e-t-n-s 6 0.730 231 0.695 6.25 -34.9 2.47 ## 11 c-t-i-l-n-s 7 0.744 219 0.703 6.22 -33.5 2.43 ## 12 c-e-t-i-n-s 7 0.740 223 0.697 6.88 -32.7 2.46 ## 13 c-e-t-i-l-n-s 8 0.746 218 0.696 8.00 -30.0 2.46 ## ## Model variables with abbreviations ## model ## s southernyes ## n noncauc ## n-s noncauc-southernyes ## t-n time-noncauc 4
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help