Learn R Programming

CorrBin (version 1.4)

SO.mc.est: Order-restricted MLE assuming marginal compatibility

Description

SO.mc.est computes the nonparametric maximum likelihood estimate of the distribution of the number of responses in a cluster $P(R=r|n)$ under a stochastic ordering constraint. Umbrella ordering can be specified using the turn parameter.

Usage

SO.mc.est(cbdata, turn = 1, control = soControl())

Arguments

cbdata
an object of class CBData.
turn
integer specifying the peak of the umbrella ordering (see Details). The default corresponds to a non-decreasing order.
control
an optional list of control settings, usually a call to soControl. See there for the names of the settable control values and their effect.

Value

  • A list with components: Components Q and D are unlikely to be needed by the user.
  • MLestdata frame with the maximum likelihood estimates of $P(R_i=r|n)$
  • Qnumeric matrix; estimated weights for the mixing distribution
  • Dnumeric matrix; directional derivative of the log-likelihood
  • loglikthe achieved value of the log-likelihood
  • convergea 2-element vector with the achived relative error and the performed number of iterations

Details

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.

References

Szabo A, George EO. (2009) On the Use of Stochastic Ordering to Test for Trend with Clustered Binary Data. Biometrika

See Also

soControl

Examples

Run this code
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~NResp|factor(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>=r|N=n)",
      ylim=c(0,1.1), main="Stochastically ordered estimates\n with marginal compatibility")

Run the code above in your browser using DataLab