Skip to content

Instantly share code, notes, and snippets.

@johnmyleswhite
Created September 17, 2012 01:28
Show Gist options
  • Save johnmyleswhite/3735101 to your computer and use it in GitHub Desktop.
Save johnmyleswhite/3735101 to your computer and use it in GitHub Desktop.
Toy Regression w/ Errors
df <- data.frame(Fahrenheit = c(212, 102, 32),
Celsius = c(100, 50, 0))
lm.fit <- lm(Fahrenheit ~ Celsius, data = df)
summary(lm.fit)
predict(lm.fit, data.frame(Celsius = 40))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment