Last chance! 50% off unlimited learning
Sale ends in
This function performs the maximum likelihood estimation for a known model in clustering
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)
array It contains the observations to cluster where the dimensions are respectively: number of the observation, site of the observation, time of the observation.
numeric. It defines possible numbers of components.
numeric. It defines possible numbers of regressions per components
numeric. It defines possible degrees of regressions.
matrix. It gives the spatial coordiantes of each site.
numeric. It indicates the moments of observations (optional, default is 1:T).
character. It indicates the criterion used for the model selection ("AIC", "BIC" or "ICL", optional, default is "BIC").
numeric. The algorithm is stopped when the loglikelihood increases less than tol during two successive iterations (optional, default is 0.001).
numeric. It defines the numerber of cores used by the alogrithm, only for Linux and Mac (optional, default is 1).
numeric. It defines the number of random initializations (optional, default is 500).
numeric. It defines the number of chains estimated until convergence (optional, default is 50).
numeric. It defines the number of iterations before keeping the nbinitKept best chains (optional, default is 20).
numeric. It defines the maximum number of iterations before to stop the algorith; (optional, default is 500).
# 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)
# }
Run the code above in your browser using DataLab