# NOT RUN {
mu1 <- c(0,0)
Sigma1 <- matrix(c(3,1,1,3), 2,2)
shape1 <-c(4,4)
nu1 <- 4
mu2 <- c(5,5)
Sigma2 <- matrix(c(2,1,1,2), 2,2)
shape2 <-c(2,2)
nu2 <- 4
pii<-c(0.6,0.4)
arg1 = list(mu=mu1, Sigma=Sigma1, shape=shape1, nu=nu1)
arg2 = list(mu=mu2, Sigma=Sigma2, shape=shape2, nu=nu2)
y <- rmmix(n= 500, p = pii, "Skew.t", list(arg1,arg2))
# }
# NOT RUN {
## Normal fit giving intial values
mu <- list(mu1,mu2)
Sigma <- list(Sigma1,Sigma2)
shape <- list(shape1,shape2)
pii <- c(0.6,0.4)
Norm.analysis <- smsn.mmix(y, nu=3, mu=mu, Sigma=Sigma, shape=shape, pii = pii,
criteria = TRUE, g=2, get.init = FALSE, group = TRUE,
family = "Normal")
mix.contour(y,Norm.analysis)
## Normal fit
Norm.analysis <- smsn.mmix(y, nu=3, g=2, get.init = TRUE, criteria = TRUE,
group = TRUE, family = "Normal")
mix.contour(y,Norm.analysis)
## Normal fit with a unique Gamma
Norm.analysis <- smsn.mmix(y, nu=3, g=2, get.init = TRUE, criteria = TRUE,
group = TRUE, family = "Normal", uni.Gama = TRUE)
mix.contour(y,Norm.analysis)
## Skew Normal fit
Snorm.analysis <- smsn.mmix(y, nu=3, g=2, get.init = TRUE, criteria = TRUE,
group = TRUE, family = "Skew.normal")
mix.contour(y,Snorm.analysis)
## t fit
t.analysis <- smsn.mmix(y, nu=3, g=2, get.init = TRUE, criteria = TRUE,
group = TRUE, family = "t")
mix.contour(y,t.analysis)
## Skew t fit
St.analysis <- smsn.mmix(y, nu=3, g=2, get.init = TRUE, criteria = TRUE,
group = TRUE, family = "Skew.t")
mix.contour(y,St.analysis)
## Skew Contaminated Normal fit
Scn.analysis <- smsn.mmix(y, nu=c(0.1,0.1), g=2, get.init = TRUE, criteria = TRUE,
group = TRUE, family = "Skew.cn",error=0.01)
mix.contour(y,Scn.analysis)
## Skew Contaminated Normal fit
Sslash.analysis <- smsn.mmix(y, nu=3, g=2, get.init = TRUE, criteria = TRUE,
group = TRUE, family = "Skew.slash", error=0.1)
mix.contour(y,Sslash.analysis)
# }
Run the code above in your browser using DataLab