inst/examples/bayesExample.R

if(interactive()){
  
data(crtData)

########################################################
## Bayesian analysis of cluster randomised trials     ##
########################################################

output <- mlmBayes(Posttest~ Intervention+Prettest,random="School",
		intervention="Intervention",nSim=10000,data=crtData)

### Fixed effects
beta <- output$Beta
beta

### Effect size
ES1 <- output$ES
ES1

## Covariance matrix
covParm <- output$covParm
covParm

### plot random effects for schools

plot(output)

### plot posterior probability of an effect size to be bigger than a pre-specified threshold

plot(output,group=1)
}
ewouddt/eefAnalytics documentation built on May 16, 2019, 9:42 a.m.