library(betareg)
a <- read.csv(choose.files())
# beta regression model
summary(betareg(P_SPEEDING_ADJ ~ log(AVG_AADT), data=a))
#negative binomial model
require(foreign)
require(ggplot2)
require(MASS)
b<- a$P_SPEEDING_ADJ
c<- a$AVG_AADT
d<- log(c)
SPEEDING_AADT<- b*d
model1= glm.nb(formula=SPEEDING_CRASH ~SPEEDING_AADT ,
data = a)
print(summary(model1))
0 comments:
Post a Comment