estimate_mixture: Performs the estimation of gaussian mixtures of regression...

View source: R/fmrcc.R

estimate_mixtureR Documentation

Performs the estimation of gaussian mixtures of regression models and gaussian mixture models. Used in FMRCC_PhaseI.

Description

Performs the estimation of gaussian mixtures of regression models and gaussian mixture models. Used in FMRCC_PhaseI.

Usage

estimate_mixture(
  y = NULL,
  x = NULL,
  ninit = 10,
  groups = 1:5,
  mode = "regression",
  intercept = TRUE,
  init_met = "kmeans",
  sigma_par = c("VVV", "EEE", "VII", "EII")
)

Arguments

y

a matrix with the scores of the response variable

x

a matrix with the scores of the covariates

ninit

the number of random starts for the model estimation. It is ignored if init_met = 'kmeans'. Default is 10

groups

the number of groups to consider in the model estimation. Default is 1:3

mode

the type of model to estimate, it can be 'regression' or 'clustering'. Default is 'regression'

intercept

logical, if TRUE the model includes an intercept. Default is TRUE

init_met

the method to initialize the model, it can be 'kmeans' or 'random'. Default is 'kmeans'

sigma_par

the covariance parametrization to consider in the model estimation. Default is c('VVV','EEE','VII','EII')

Value

a list with the model estimated, the residuals variance matrix and the BIC values


funcharts documentation built on Dec. 12, 2025, 5:06 p.m.