```r
library(MASS)
```

```
## 
## Attaching package: 'MASS'
```

```
## The following object is masked from 'package:plotly':
## 
##     select
```

```r
x<-sample(0:10,20,rep=T)
y<-rnegbin(20,mu=x,theta=2)
plot(y~x)
```

<img src="Quantitative_and_Spatial_files/figure-html/unnamed-chunk-115-1.png" width="672" />

```r
mod.negbin<-lm(y~x)
```