Description Usage Arguments Value Examples
This function performs the maximum likelihood estimation for a known model in clustering
1 2 3 | spatimeclus(obs, G, K, Q, map = NULL, m = 1:(dim(obs)[3]), crit = "BIC",
tol = 0.001, param = NULL, nbcores = 1, nbinitSmall = 500,
nbinitKept = 50, nbiterSmall = 20, nbiterKept = 500)
|
obs |
array It contains the observations to cluster where the dimensions are respectively: number of the observation, site of the observation, time of the observation. |
G |
numeric. It defines possible numbers of components. |
K |
numeric. It defines possible numbers of regressions per components |
Q |
numeric. It defines possible degrees of regressions. |
map |
matrix. It gives the spatial coordiantes of each site. |
m |
numeric. It indicates the moments of observations (optional, default is 1:T). |
crit |
character. It indicates the criterion used for the model selection ("AIC", "BIC" or "ICL", optional, default is "BIC"). |
tol |
numeric. The algorithm is stopped when the loglikelihood increases less than tol during two successive iterations (optional, default is 0.001). |
param |
list of STCparam. It gives the initial values of the EM algorithm (optional, starting point are sampled at random). |
nbcores |
numeric. It defines the numerber of cores used by the alogrithm, only for Linux and Mac (optional, default is 1). |
nbinitSmall |
numeric. It defines the number of random initializations (optional, default is 500). |
nbinitKept |
numeric. It defines the number of chains estimated until convergence (optional, default is 50). |
nbiterSmall |
numeric. It defines the number of iterations before keeping the nbinitKept best chains (optional, default is 20). |
nbiterKept |
numeric. It defines the maximum number of iterations before to stop the algorith; (optional, default is 500). |
Returns an instance of STCresults.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
data(airparif)
# Clustering of the data by considering the spatial dependencies
res.spa <- spatimeclus(airparif$obs, G=3, K=4, Q=4, map = airparif$map,
nbinitSmall=50, nbinitKept=5, nbiterSmall=5)
summary(res.spa)
# Clustering of the data without considering the spatial dependencies
res.nospa <- spatimeclus(airparif$obs, G=3, K=4, Q=4, nbinitSmall=50, nbinitKept=5, nbiterSmall=5)
summary(res.nospa)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.