Skip to Main Content
Data Analysis and Statistics for Geography, Environmental Science, and Engineering
book

Data Analysis and Statistics for Geography, Environmental Science, and Engineering

by Miguel F. Acevedo
December 2012
Beginner content levelBeginner
557 pages
19h 5m
English
CRC Press
Content preview from Data Analysis and Statistics for Geography, Environmental Science, and Engineering
207Regression
We can do a nonintercept regression by adding 0 or −1 to the expression y ~ x to read y ~ 0 +x
or y ~ x 1. Let us try
tox <- read.table(file=“lab6/test-RTO.txt”,header=T)
attach(tox)
tox.lm <- lm(Resp ~ 0 + Exp) # regression with 0 intercept
plot(Exp,Resp) # scatter plot
abline(a=0, b=tox.lm$coef) # add regression line to scatter plot
summary(tox.lm) # get more info on regression object
par(mfrow=c(2,2));plot(tox.lm) # diagnostic plots residual error
to get graphs in Figures 6.19 and 6.20.
0246
810
0
5
10
15
20
Exp.
Resp.
FIGURE 6.19 Regression through the origin.
0510 15
−1
1
2
Fitted values
Residuals
Residuals vs. fitted
2
5
4
−1.5 −0.5 0.5 1.5
−1.0
0.5 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Applied Modeling Techniques and Data Analysis 1

Applied Modeling Techniques and Data Analysis 1

Yannis Dimotikalis, Alex Karagrigoriou, Christina Parpoula, Christos H. Skiadas
Geospatial Data and Analysis

Geospatial Data and Analysis

Aurelia Moser, Jon Bruner, Bill Day

Publisher Resources

ISBN: 9781439885017