-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
77 lines (61 loc) · 1.92 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# DGLMExtPois
<!-- badges: start -->
[![R-CMD-check](https://github.com/franciscomartinezdelrio/DGLMExtPois/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/franciscomartinezdelrio/DGLMExtPois/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
DGLMExtPois is a package that contains statistical functions for the model
estimation, dispersion testing and diagnosis of hyper-Poisson and
Conway-Maxwell-Poisson regression models.
## Installation
You can install the released version of DGLMExtPois from [CRAN](https://CRAN.R-project.org) with:
``` r
install.packages("DGLMExtPois")
```
and the development version from github with:
```{r gh-installation, eval = FALSE}
devtools::install_github("franciscomartinezdelrio/DGLMExtPois")
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r example hP}
library(DGLMExtPois)
library(Ecdat)
Bids$size.sq <- Bids$size ^ 2
hP.bids <- glm.hP(formula.mu = numbids ~ leglrest + rearest + finrest +
whtknght + bidprem + insthold + size + size.sq +
regulatn,
formula.gamma = numbids ~ 1,
data = Bids)
summary(hP.bids)
AIC(hP.bids)
BIC(hP.bids)
coef(hP.bids)
confint(hP.bids)
head(fitted(hP.bids))
head(residuals(hP.bids))
```
```{r example CMP}
CMP.bids <- glm.CMP(formula.mu = numbids ~ leglrest + rearest + finrest +
whtknght + bidprem + insthold + size + size.sq +
regulatn,
formula.nu = numbids ~ 1,
data = Bids)
summary(CMP.bids)
AIC(CMP.bids)
BIC(CMP.bids)
coef(CMP.bids)
confint(CMP.bids)
head(fitted(CMP.bids))
head(residuals(CMP.bids))
```