---
title: "New Car Purchase"
output: html_document
---

```{r setup, include=TRUE, message=FALSE}
knitr::opts_chunk$set(echo = TRUE)
require(Sleuth3)
require(tigerstats)
```
Getting the data:
```{r}
lines <- 
"NEWCAR	INCOME	CAR.AGE
0	32	3
0	45	2
1	60	2
0	53	1
0	25	4
1	68	1
1	82	2
1	38	5
0	67	2
1	92	2
1	72	3
0	21	5
0	26	3
1	40	4
0	33	3
0	45	1
1	61	2
0	16	3
1	18	4
0	22	6
0	27	3
1	35	3
1	40	3
0	10	4
0	24	3
1	15	4
0	23	3
0	19	5
1	22	2
0	61	2
0	21	3
1	32	5
0	17	1"

con <- textConnection(lines)
newcars <- read.csv(con, sep="")
```

```{r}
fit <- glm(NEWCAR ~ INCOME + CAR.AGE, family=binomial(link="logit"), data=newcars)
summary(fit)
```

Coefficients:

```{r}
exp(fit$coefficients)
```


