## Nonparametric credible regions for mixtures of regressions fit to NOdata.
data(NOdata)
attach(NOdata)
beta<-matrix(c(1.3, -0.1, 0.6, 0.1), 2, 2)
sigma<-c(.02, .05)
MH.out<-regmixMH(Equivalence, NO, beta = beta, s = sigma,
sampsize = 10000, omega = .0013)
attach(data.frame(MH.out$theta))
beta.c1<-cbind(beta0.1[9950:9999], beta1.1[9950:9999])
beta.c2<-cbind(beta0.2[9950:9999], beta1.2[9950:9999])
plot(NO, Equivalence)
regcr(beta.c1, x = NO, nonparametric = TRUE, plot = TRUE,
col = 2)
regcr(beta.c2, x = NO, nonparametric = TRUE, plot = TRUE,
col = 3)Run the code above in your browser using DataLab