Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lm1<-lm(FreeLunch~MeetTestStandards,data=TestScores) ## Original
- lm2.resample <- do(100) * lm(FreeLunch ~ MeetTestStandards,data=resample(TestScores)) ## Resample
- ##lm2.shuffle <- do(100) * lm(shuffle(FreeLunch) ~ MeetTestStandards,data=TestScores) ## Permutation
- sd <- sd(lm2.resample$MeetTestStandards)
- mean <- mean(lm2.resample$MeetTestStandards)
- Conf.int <- c(mean,mean) + c(-2*sd,2*sd) ## Confidence Interval
- plot(density(lm2.resample$MeetTestStandards)) ## Plot of resampling distribution
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement