New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Biostatistics Weeks 11-13 Class Notes

by: Kiara Lynch

Biostatistics Weeks 11-13 Class Notes BIO 472

Marketplace > La Salle University > Biology > BIO 472 > Biostatistics Weeks 11 13 Class Notes
Kiara Lynch
La Salle

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

R code; boxplots; simple linear regression; 1 factor analysis of Variance, analysis of covariance
Class Notes
25 ?




Popular in Biostatistics

Popular in Biology

This 9 page Class Notes was uploaded by Kiara Lynch on Friday April 29, 2016. The Class Notes belongs to BIO 472 at La Salle University taught by in Summer 2015. Since its upload, it has received 11 views. For similar materials see Biostatistics in Biology at La Salle University.


Reviews for Biostatistics Weeks 11-13 Class Notes


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 04/29/16
Biostatistics Week 11 Notes protein<-read.csv("standardcurve.csv",header=T) attach(protein) protein plot(Absorbance~Concentration, #plot(y~x pch=21, #shape of the points bg="goldenrod", #fill color cex=1.2, #size of the points ylab="Absorbance", xlab="Protein Concentration (mg/mL)") #Does it appear linear? yes lm.protein<-lm(Absorbance~Concentration) abline(lm.protein, #best fit line lwd=2, col="red") summary(lm.protein) #Absorbance = .01413 + 1.057357*Concentration #What is the protein concentration for "unknown samples" if absorbance is... #.2 #.4 #.6 (0.2 - 0.01413)/1.057357= .1757874 (0.4 - 0.01413)/1.057357= .3649382 (0.6 - 0.01413)/1.057357= .5540891 ##### unk.Absorbance<-c(0.2,0.4,0.6) pred.concentration<-(unk.Absorbance-0.01413)/1.07357 #get same values as above pred.concentratio cbind(unk.Absorbance,pred.concentration) #"Column Bind" plot(lm.protein$residuals~lm.protein$fitted, #look at constant variation asp=T, #homoscadasticity ylab="Residuals", xlab="Predicted Absorbance") abline(h=0) shapiro.test(lm.protein$residuals) ########################### plot(Absorbance~Concentration, type="n", #points are not plotted xlab="Protein Concentration (mg/mL)", ylab="Absorbances", font.lab=2, #"BOLD" cex.lab=1.2, font.axis=3, #"Italics" cex.axis=1.2, main="Abosrbance ~ Protein Relationship", font.main=4, #Bold and Italicized cex.main=1.3) z<-par('usr") rect(z[1],z[3],z[2],z[4], #notice...1,3,2,4 col="grey") points(Abosrbance~Concentration, pch=24, bg="red", cex=1.5) abline(lm.protein, col="orchid4", lwd=3) text(0.31,1, #centers on the 'x','y' "Absorbance=0.014+1.074*Protein", cex=1.4) Wheatear.csv Hemigraspus.csv Linear model equation Proportion of variation explained - .3336 33.36% is explained by explanatory variable Statistically significant? P value = .0061 --> yes Stone mass = intercept + T cell estimate * T cell #make linear model equation, what is the proportion of variation, is it statistically significant wheat<-read.csv("wheatear.csv",header=T) attach(wheat) wheat plot(StoneMass~Tcell_mm, #T cell is explanatory variable pch=21, bg="lightseagreen", cex=1.2, ylab="Stone Mass (g)", xlab="T cell (mm)") lm.wheat<-lm(StoneMass~Tcell_mm) hist(lm.wheat$residuals) shapiro.test(lm.wheat$residuals) #p value > .05 plot(lm.wheat$residuals~lm.wheat$fitted.values) abline(h=0) summary(lm.wheat) #residuals, coefficients, p value etc. #proportion of variation = R squared --> .3336 #p value = .006105 #StoneMass= 3.911+10.165*Tcell_mm ################################### crab<-read.csv("hemigraspus.csv",header=T) attach(crab) crab plot(Force~Height) lm.crab<-lm(Force~Height) hist(lm.crab$residuals) #skewed shapiro.test(lm.crab$residuals) #p value <.05 --> do log regression for response variable plot(log(Force)~Height) lm.log<-lm(log(Force)~Height) hist(lm.log$residuals) #still skewed shapiro.test(lm.log$residuals) #p value still < .05 #can't assume normality, but can assume homoscadasticity; had to log transform response variable plot(lm.log$residuals~lm.log$fitted.values) abline(h=0) summary(lm.log) Call: lm(formula = log(Force) ~ Height) Residuals: Min 1Q Median 3Q Max -0.59213 -0.26746 -0.09652 0.24813 0.90005 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 0.97897 0.52784 1.855 0.0884 . Height 0.04712 0.06461 0.729 0.4798 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 0.4832 on 12 degrees of freedom Multiple R-squared: 0.04245, Adjusted R-squared: -0.03735 F-statistic: 0.5319 on 1 and 12 DF, p-value: 0.4798 Not significant, p value > .05 4/13 Analysis of Covariance Confounding factors are covariates Explain variability of response variable c<-read.csv("crickets.csv",header=T) attach(c) names(c) #response variable is PPS (pulse per second) #explanatory variables are Temperature (cont.) adn Species (cat.) plot(PPS~Temperature) #appears relatively linear boxplot(PPS~Species) #some level of differentiation b/w two species #homogeneity of variance library(car) leveneTest(PPS~Species) P value > .05 #Assess Assumptions: "common slope" #subset and visually inspect "common slope" #separate linear regression for each species exc<-subset(c, Species=="O_exclamationis") names(exc) niv<-subset(c, Species=="O_niveus") niv #build linear models for each species separately lm.exc<-lm(exc$PPS~exc$Temperature) lm.niv<-lm(niv$PPS~niv$Temperature) summary(lm.exc) summary(lm.niv) #slopes have similar slopes- common slope is essential for ancova plot(PPS~Temperature, type="n") abline(lm.exc, col="blue") #regression line for O. exclamationis abline(lm.niv, col="purple") #regression line for O. niveus points(exc$PPS~exc$Temperature, #plot to make sure slopes look equal pch=21, bg="blue") points(niv$PPS~niv$Temperature, pch=21, bg="purple") #still need to assess homoscedasticity and normality of residuals anc<-lm(PPS~Species+Temperature) #lm(Y~X1+X2) hist(anc$residuals) shapiro.test(anc$residuals) #p value is > .05 --> normal #residuals are normal #are the errors homoscedastic? (equal statistical variances) plot(anc$residuals~anc$fitted.values, pch=21, bg="black") abline(h=0) summary(anc) Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -7.21091 2.55094 -2.827 0.00858 ** SpeciesO_niveus -10.06529 0.73526 -13.689 6.27e-14 *** Temperature 3.60275 0.09729 37.032 < 2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 1.786 on 28 degrees of freedom Multiple R-squared: 0.9896, Adjusted R-squared: 0.9888 F-statistic: 1331 on 2 and 28 DF, p-value: < 2.2e-16 #adjusted R squared- interpreted the same way #98.88% of variation can be explained by species and temperature of pulsing #ANOVA anova<-lm(PPS~Species) summary(anova) #adjusted R squared variable is different #simple linear regression reg<-lm(PPS~Temperature) summary(reg) #What type of study would you use ANCOVA? ANCOVA II ANCOVA is a hybrid between factorial ANOVA and simple linear regression Y is numeric- covariate X, two explanatory variables- categorical factor (ex: species) • factor (with two or more levels) • numeric confounding variable Assumptions of ANCOVA Independence of the covariate and treatment effect Homogeneity of common slope Homoscedasticity of residuals Normality of residuals Multiple explanatory variables --> adjusted R^2 Simple linear regression- look at regular r squared Multiple variables- look at adjusted r^2 to see how much variance is accounted for by the variables Ex: How much variation can be explained by species and temperature? Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) -7.21091 2.55094 -2.827 0.00858 **Species -10.06529 0.73526 -13.689 6.27e-14 ***Temperature 3.60275 0.09729 37.032 < 2e-16 *** Both Species and Temperature contribute significantly to the variation in Pulses Per Second.• Species are significantly different Higher frequency of Pulses at warmer temperatures P values- first one doesn't matter- looking at variables 2 p values about the same and 1 different (intercept- significantly different from 0) Species- are the means significantly different Temperature- is the slope significantly different from 0 Estimate- how different are the means Both temperature and species significantly contribute to the variation in our response variable If the covariate is not significantly different? If p > .05 Get rid of it 1 factor anova Redo analysis without the covariate If the factor (ex: species) is not statistically different? Simple linear regression Remove terms that are not statistically different and redo the model For Exam: Describe a study One-Factor ANOVA Simple Linear Regression ANCOVA Scientific hypothesis? What are the assumptions? For ANCOVA, why would you measure a covariate on each subject?


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Amaris Trozzo George Washington University

"I made $350 in just two days after posting my first study guide."

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.