library(foreign)
x <- read.spss("crimes_loc01.sav")
x1 <- data.frame(x)
x4 <- na.omit(x1)
plot(c(110,180),c(20,240), axes=F, type="n",
main="Crimes committed in two locations", xlab="Age", ylab="Number of Crimes committed")
axis(1, at=c(0,110,120,130,140,150,160,170,180))
axis(2, at=c(0,20,40,60,80,100,120,140,160,180,200,220))
points(x1$age0,x1$crime0,pch=0)
z <- lm(x1$crime0 ~ x1$age0)
abline(z,lty=3)
points(x1$age1,x1$crime1,pch=1)
z1 <- lm(x1$crime1 ~ x1$age1)
abline(z1,lty=1)
legend(x=155,y=220,c("Manchester","Newcastle"), pch=c(0,1),lty=c(3,1))