View source: R/regression_models_for_clustered_data.R

Fixed intercepts Poisson regression | R Documentation |

Fixed intercepts Poisson regression.

```
fipois.reg(y, x, id, tol = 1e-07, maxiters = 100)
```

`y` |
The dependent variable, a numerical vector with integer, non negative valued data. |

`x` |
A matrix with the indendent variables. |

`id` |
A numerical variable with 1, 2, ... indicating the subject. Unbalanced design is of course welcome. |

`tol` |
The tolerance value to terminate the Newton-Raphson algorithm.
This is set to |

`maxiters` |
The maximum number of iterations that can take place during the fitting. |

Fixed intercepts Poisson regression for clustered count data is fitted. According to Demidenko (2013), when the
number of clusters (N) is small and the number of observations per cluster (`n_i`

) is relatively large,
say `min(n_i) > N`

, one may assume that the intercept `\alpha_i = \beta + u_i`

is fixed and unknown
(`i=1,...,N`

).

A list including:

`be` |
The regression coefficients. |

`seb` |
The standard errors of the regression coefficients. |

`ai` |
The estimated fixed intercepts fore ach cluster of observations. |

`covbeta` |
The covariance matrix of the regression coefficients. |

`loglik` |
The maximised log-likelihood value. |

`iters` |
The number of iteration the Newton-Raphson required. |

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

Eugene Demidenko (2013). Mixed Models: Theory and Applications with R, pages 388-389, 2nd Edition. New Jersey: Wiley & Sons (excellent book).

` cluster.lm, fe.lmfit, gee.reg, covar, welch.tests `

```
y <- rpois(200, 10)
id <- sample(1:10, 200, replace = TRUE)
x <- rpois(200, 10)
fipois.reg(y, x, id)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.