SO.mc.est {CorrBin}  R Documentation 
SO.mc.est
computes the nonparametric maximum likelihood estimate of
the distribution of the number of responses in a cluster P(R=rn)
under
a stochastic ordering constraint. Umbrella ordering can be specified using
the turn
parameter.
SO.mc.est(cbdata, turn = 1, control = soControl())
cbdata 
an object of class 
turn 
integer specifying the peak of the umbrella ordering (see Details). The default corresponds to a nondecreasing order. 
control 
an optional list of control settings, usually a call to

Two different algorithms: EM and ISDM are implemented. In general, ISDM (the
default) should be faster, though its performance depends on the tuning
parameter max.directions
: values that are too low or too high slow the
algorithm down.
SO.mc.est
allows extension to an umbrella ordering: D_1 \geq^{st}
\cdots \geq^{st} D_k \leq^{st} \cdots \leq^{st} D_n
by specifying the value of k
as the turn
parameter. This is an experimental feature, and at this point none of the
other functions can handle umbrella orderings.
A list with components:
Components Q
and D
are unlikely to be needed by the user.
MLest 
data frame with the maximum likelihood estimates of

Q 
numeric matrix; estimated weights for the mixing distribution 
D 
numeric matrix; directional derivative of the loglikelihood 
loglik 
the achieved value of the loglikelihood 
converge 
a 2element vector with the achived relative error and the performed number of iterations 
Aniko Szabo, aszabo@mcw.edu
Szabo A, George EO. (2009) On the Use of Stochastic Ordering to Test for Trend with Clustered Binary Data. Biometrika
data(shelltox)
ml < SO.mc.est(shelltox, control=soControl(eps=0.01, method="ISDM"))
attr(ml, "converge")
require(lattice)
panel.cumsum < function(x,y,...){
x.ord < order(x)
panel.xyplot(x[x.ord], cumsum(y[x.ord]), ...)}
xyplot(Prob~NRespfactor(ClusterSize), groups=Trt, data=ml, type="s",
panel=panel.superpose, panel.groups=panel.cumsum,
as.table=TRUE, auto.key=list(columns=4, lines=TRUE, points=FALSE),
xlab="Number of responses", ylab="Cumulative Probability R(R>=rN=n)",
ylim=c(0,1.1), main="Stochastically ordered estimates\n with marginal compatibility")