# NOT RUN {
#Note the number of iterations is small to control run time
generatedData=generate.cluster.data(.25,npats=25,clusts=c(12,8),beta=c(-5,5),
outcomeModel=binaryOutcome(0))
usBinary=supcluster(generatedData[[1]],outcome="outcome",
maxclusters=5,nstart=100,n=200,fbeta=FALSE,
linkLikelihood=binaryLink(generatedData[[2]]))
## The function is currently defined as
function (x)
{
m = length(x)
outfcn = function(parm2) {
bx = parm2[m + 1] + parm2[1:m]
loglik = sum(x * bx) - sum(log(1 + exp(bx)))
return(loglik)
}
return(outfcn)
}
# }
Run the code above in your browser using DataLab