The main function of Robust Mixture Regression using five methods.
rmr(lr.method = "flexmix", formula = NULL, data = NULL, nc = 2,
nit = 20, tRatio = 0.05, MaxIt = 200)
A robust mixture regression method to be used. Should be one of "flexmix", "TLE", "CTLERob", "mixbi","mixLp".
A symbolic description of the model to be fit.
A data frame containing the predictor and response variables, where the last column is the response varible.
Number of mixture components.
Number of iterations for CTLE, mixbi, mixLp.
Trimming proportion for TLE method.
Maximum iteration for TLE method.
An S4 object about the regression result.
library(RobMixReg)
#library(robust)
library(flexmix)
#> Loading required package: lattice
library(robustbase)
#> Warning: package ‘robustbase’ was built under R version 4.0.5
library(MASS)
library(gtools)
# gaussData
x=(gaussData$x);y=as.numeric(gaussData$y);
formula01=as.formula("y~x")
example_data01=data.frame(x,y)
res_rmr = rmr(lr.method='flexmix', formula=formula01, data=example_data01)
res_rmr = rmr(lr.method='CTLERob', formula=formula01, data=example_data01)