CalcStatClusterGivenCenter {DClusterm} | R Documentation |

## Calls the function to obtain the cluster with the maximum log-likelihood ratio or minimum DIC of all the clusters with the same center and start and end dates.

### Description

This function orders the regions according to the distance to a given center and selects the regions with distance to the center less than sqrt(rr). Then it calls glmAndZIP.iscluster() to obtain the cluster with the maximum log-likelihood ratio or minimum DIC of all the clusters with the same center and start and end dates, and where the maximum fraction of the total population inside the cluster is less than fractpop.

### Usage

```
CalcStatClusterGivenCenter(
point,
stfdf,
rr,
minDateCluster,
maxDateCluster,
fractpop,
model0,
ClusterSizeContribution
)
```

### Arguments

`point` |
vector with the coordinates of the center of the cluster. |

`stfdf` |
spatio-temporal class object containing the data. |

`rr` |
square of the maximum radius of the cluster. |

`minDateCluster` |
start date of the cluster. |

`maxDateCluster` |
end date of the cluster. |

`fractpop` |
maximum fraction of the total population inside the cluster. |

`model0` |
Initial model (including covariates). |

`ClusterSizeContribution` |
Variable used to check the fraction of the
population at risk in the cluster
This can be "glm" for generalized linear models (glm stats),
"glmer" for generalized linear mixed model (glmer lme4),
"zeroinfl" for zero-inflated models (zeroinfl), or
"inla" for generalized linear, generalized linear mixed or zero-inflated models fitted with |

### Value

vector containing the coordinates of the center, the size, the start and end dates, the log-likelihood ratio or DIC, the p-value and the risk of the cluster with the maximum log-likelihood ratio or minimum DIC.

*DClusterm*version 1.0-1 Index]