insects<-read.csv(‘insects_data.csv’)
mean(insects$counts [insects$species == "Megacrania" & insects$season == "Spring"])
mean(insects$counts [insects$species == "Extatosoma" & insects$season == "Autumn"]) spelificmean
t <- aov(counts ~ species + season + species*season, data = insects_data)
summary( t)
IwayAnova
Week 5:
Install readxl package
library(readxl)
calls<-read_excel(‘calls.xlsx’)
mean(calls$Calls)
t <- lm(Executions ~ Calls)
im independent dependent simple linear regression
summary( t)
cor(y=calls$Executions, x=calls$Calls)
regression <- lm(Executions~Calls, data=calls)
summary(regression)
con nt(regression)
plot(x=calls$Calls, y=calls$Executions)
xlab= “number of phone calls”, ylab= “number of executions”
Week 6:
View(multreg)
df <- read.csv("multreg.csv")
View(df)
mult.numeric <- df[ , c("Price", "PlotSize", "FloorArea", "Trees", "Distance")]
cor.multi.numeric <- cor(mult.numeric)
multiple linearregression
cor(mult.numeric)
df$Pool <- as.factor(df$Pool) convertingnumericvariables to fan or variables
contrasts(df$Pool)
t <- lm(Price ~ PlotSize + FloorArea + Trees + Distance + Pool + PlotSize*FloorArea, data = df)
summary( t)
imlynxdata
con nt( t)
predict( t)
torind estimateddependentvariable
Week 7:
log <- read.csv("logreg.csv")
View(log)
dep explanatory
t <- glm(cases ~ sex + income , data = log, family = "binomial" )
logistic regression
summary( t)
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller hslisa001. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $7.14. You're not tied to anything after your purchase.