## Not run:
# #example 1. Here, we want to regress 'Coffee' on 'Neuroticism',
# #taking into account possible gender differences.
# #Simulating 100 males
# coffeem=rnorm(100,100,15)
# neuroticismm=(coffeem*.8)+rnorm(100,15,8)
# clusterid=rep(1,100)
# males=cbind(coffeem,neuroticismm,clusterid)
# coffeef=rnorm(100,100,15)
# neuroticismf=160+((coffeef*-.8)+rnorm(100,15,8))
# clusterid=rep(2,100)
# females=cbind(coffeef,neuroticismf,clusterid)
# data=data.frame(rbind(males,females))
# colnames(data) <- c("Coffee","Neuroticism","gender")
#
# example1=Simpsons(Coffee,Neuroticism,clusterid=gender, data=data)
# example1
#
# ## End(Not run)
Run the code above in your browser using DataLab