Usage
fMMalgo(M, G, data, Id=NULL, Wweight_SR=NULL, Wdist_LR=NULL, posterior_proba=NULL,
formula_reg, offset_reg=NULL, family=gaussian(link="identity"), prior_theta="kmeans", prior_sigma=NULL,
formula_group=NULL, prior_prevalence=FALSE, prior_proba=NULL,
test.GR=FALSE, sigma_GR="auto", proba_GR=NULL, proba_GRseed=NULL, seed=NULL, n.order=3,
test.ICM=FALSE, rho_ICM="init", G_ICM=1:G, prior_prevalenceICM=TRUE, rho_max=10, update_rho=FALSE,
test.ICMregional=FALSE, coords=NULL, nbGroup_min=100, threshold_potential=0.1, distance_ref=NULL,
multiV=FALSE, digit.pmin=7, epsilon=10^(-3), epsilon_corrSpat=epsilon*10, iter_max=100,
trace=TRUE, trace_iter=FALSE, trace_radius=FALSE, export.predicteur=FALSE)Arguments
M
The number of responses variable. integer.
G
The number of groups to be considered for the mixture. integer.
data
A dataframe containing the data. data.frame[n,p].
Id
The identifier of the images to segment. character vector[n]. Default is NULL indicating a unique identifier for all voxels.
Wweight_SR
The local neighborhood matrix. dgCMatrix[n,n]. Should be normalized by row (i.e. rowSums(Wweight_SR)=1). Only used if test.GR or test.ICM is true.
Wdist_LR
The regional neighborhood matrix. dgCMatrix[n,n]. Should contain the distances between the observations (0 indicating infinite distance). Only used if both test.ICM and test.ICMregional are true
formula_reg
A list of formula corresponding to the reponse model of each group for each response variable. list[[M]][[G]].
offset_reg
A list of offset corresponding to each reponse model. list[[M]][n,G]. Default is NULL indicating no offset.
family
A list of families corresponding to the response model of each group for each response variable. list[[M]][[G]].
prior_theta
Initialisation of the means of each group means by random sampling (NULL), kmeans ("kmeans") or user defined values (list[[M]][G]).
prior_sigma
Initialisation of the standard deviation of each group by dividing the total variance by G (NULL), by the standard deviation of the kmeans groups ("kmeans") or by user defined values (list[[M]][G]).
posterior_proba
Initialisation of the posterior membership probabilities to user defined values (matrix[n,g]). Ignored if NULL.
formula_group
A formula for the concomitant model (formula). Else (NULL) indicates no concomittant model.
prior_prevalence
Should a prior based on the prevalence of each group be used ? logical.
prior_proba
Initialisation of the prior membership probabilities to user defined values (matrix[n,g]) or to uninformative values (NULL).
test.GR
Should Growing Region algorithm be performed ? logical.
sigma_GR
Maximum variance of the Growing Region. Can be set to a user defined value (numeric) or estimated by the variance of group G ("auto").
proba_GRseed
Seeds with group probability membership below proba_GRseed are excluded from the initialisation step of the GR algorithm. numeric. Ignored if NULL.
proba_GR
Minimum probability membership to group G required for an observation to be a candidate for the GR. numeric. Ignored if NULL.
seed
(T/F) or (1/0) indicating the seeds to be used in the GR algorithm. logical vector[n]]. Can alternatively contains the name of a column in data (character).
n.order
The penalization for the voxels outside the lesion group defined by the growing region algorithm (bandwith of the gaussian kernel). numeric. Default is 3.
test.ICM
Should local/regional regularization be performed ? logical.
rho_ICM
Value of the spatial regularisation parameters : can be fixed a priori (numeric if test.ICMregional=F and numeric vector[2] if test.ICMregional=T) or estimated ("init").
G_ICM
Potential group merging for the regularization step (interger[G]) where each element must be inferior or equal to G.
prior_prevalenceICM
Should a prior based on the prevalence of each group be used for estimation of the regularization paramters ? logical. Default is FALSE.
rho_max
Maximum possible rho value (numeric), minimum is 0. Only used if rho_ICM="init".
update_rho
Should rho be re-estimated using the posterior probabilites at each step ? logical.
test.ICMregional
Should regional regularization be performed ? logical. test.ICM must be also T to be active.
coords
Coordinates (matrix[n,.]) or the name of columns in data (character vector[.]) giving the observation coordinates.
nbGroup_min
The minimum group size of the spatial groups required for performing regional regularization. integer. Default is 100.
threshold_potential
The minimum value of the posterior probability for group G for being considered as lesioned when forming the spatial groups. numeric.
distance_ref
The distance defining the several neighborhood orders relatively to Wdist_LR. numeric vector[.].
multiV
Should the regional potential range be specific to each spatial group ? logical. Default is FALSE.
digit.pmin
Below 10^{-digit.pmin} the posterior probability is set to 0. integer
epsilon
Convergence occurs when the relative variation of the log-likelihood or of the parameter values between two iterations is below epsilon. numeric
epsilon_corrSpat
Spatial regularization begins when the relative variation of the log-likelihood or of the parameter values between two iterations is below epsilon_corrSpat. numeric.
iter_max
Maximum number of EM iterations. integer. Default is 100.
trace
Should initialisation and final EM estimations be displayed ? logical. Default is TRUE.
trace_iter
Should estimations be displayed at each EM iteration ? logical. Default is FALSE.
trace_radius
Should the radius of the spatial groups be displayed at each EM iteration ? logical. Default is FALSE.
export.predicteur
Should the fitted glm models be exported or only their summary ? logical. Default is FALSE.