100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Summary STA2020 coding R125,33   Add to cart

Summary

Summary STA2020 coding

 10 views  0 purchase

STA2020 coding for labs

Preview 1 out of 3  pages

  • May 15, 2024
  • 3
  • 2023/2024
  • Summary
All documents for this subject (7)
avatar-seller
hslisa001
Week 2:

drywide <- read.csv("drying_times_wide.csv")
mean(drywide$Paint.1)
mean(drywide$Paint.2)
sd(drywide$Paint.1)

drylong <- read.csv("drying_times_long.csv")
View(drylong)
t <- aov(drying_time ~ paint , data= drylong)
summary( t)


Week 3:

oat_variety<-read.csv (‘oat_variety.csv’)
View(oat_variety)
variety <- as.factor(oat_variety$variety)
mean(oat_variety$yield [oat_variety$variety == "Golden.rain"])
mean(oat_variety$yield [oat_variety$variety == "Marvellous"])
mean(oat_variety$yield [oat_variety$variety == "Victory"])
sd(oat_variety$yield [oat_variety$variety == "Golden.rain"])
t <- aov(yield ~ variety + plot , data = oat_variety)
summary( t)


Week 4:

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)

mb_data <- read.csv('step.csv')
str(mb_data)
mb_data$medschl <- as.factor(mb_data$medschl)
mb_data$region <- as.factor(mb_data$region)
t.full <- lm(length ~ . , mb_data) modelbuilding
summary( t.full)
t.empty <- lm(length ~ 1, mb_data) stepwiseregression
step.model <- step( t.empty, scope = formula( t.full), direction = 'forward')
summary(step.model)

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

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

Quick and easy check-out

You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

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 this summary 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 this summary for R125,33. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

73216 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 14 years now

Start selling
R125,33
  • (0)
  Buy now