A package for using the BLRCR model.
Begin with installing R and RStudio.
You can install this beta version of BLRCR from GitHub with:
# install.packages("devtools")
devtools::install_github("rgranger617/BLRCR")Check out the BLRCRsolvermissing() function:
library(BLRCR)
#Create the Data
myN = 2000
mybeta = matrix(c(-2,-1,1,
-2,1,-1,
-2,-1,1,
-2,1,-1),nrow=4,byrow=TRUE)
mynormprobs=c(0.3,0.4,0.3)
mynormmeans=matrix(c(2,2,
0,0,
-2,-2),ncol=2,byrow=TRUE)
mynormsigma=matrix(c(.5,.45,.45,.5,
1,0,0,1,
.5,-.35,-.35,.5),nrow=3,byrow=TRUE)
myCRdata = multdatasimulator(myN,mybeta,mynormprobs,mynormmeans,mynormsigma,
missing=TRUE)
#Run the Algorithm
myformula = cbind(y1,y2,y3,y4)~x1+x2
CRresults=BLRCRsolvermissing(myformula,df=myCRdata,Homega=1,
Bprior=1,LBprior=1,
covsupport="unique",
samples = 1000,burnin=10,thinning = 10)
quantile(CRresults$N,c(.025,.5,.975))