..-
help for ^ocratio^                                           Statalist, 18Feb1998
..-

Continuation-ratio models for ordinal responses
- -----------------------------------------------

	^ocratio^ depvar varlist [weight] [^if^ exp] [^in^ range] [, ^t^est
		^li^nk^(^linkname^)^ ^e^form ^cum^ulative ^l^evel^(^#^)^ ]

	^ocrpred^ [type] newvarlist [, ^xb^ ^pr^ob ]

where linkname is one of

	^l^ogit | ^p^robit | ^c^loglog

^fweights^ are allowed; see help @weights@ and examples below.

^ocratio^ shares most features of estimation commands; see ^[U] 26 Estimation^
^and post-estimation commands^. However, to obtain predictions from the model
^ocrpred^ should be used in place of @predict@. 

To reset problem-size limits, see help @matsize@.


Description
- -----------

^ocratio^ fits models based on continuation-ratio probabilities to ordinal 
responses (using maximum-likelihood). Three models are available using the
logit, probit and complementary-log-log (f(x)=log[-log(1-x)]) functions.
These models are an alternative to the models based on cumulative 
probabilities fitted by @ologit@ and @oprobit@. ^ocratio^ also enables the 
fitting of a "ocloglog" model by using the ^cumulative^ option described 
below. This is possible because the "ocloglog" model is equivalent to the
continuation-ratio complementary-log-log.

^ocrpred^, for use after ^ocratio^, creates newvar containing the index (i.e. 
xb, see @predict@) or newvarlist containing predicted probabilities for each
response category (similarly to @ologitp@).


Options for use with ^ocratio^
- ----------------------------

^test^ requests the calculation of the likelihood-ratio test of whether the
	model parameters are constant across the categories of the response
	variable.

^link(^linkname^)^ specifies the link function. The default is ^link(logit)^ 
	unless ^cumulative^ is requested in which case it is ^link(cloglog)^.

^eform^ displays the exponentiated coefficients with corresponding standard
	errors and confidence intervals as described in ^[R] maximize^. For the
	logit link, exponentiation results in odds ratios of continuation-ratio
	probabilities; for the cloglog link, exponentiation results in ratios
	of discrete hazard functions.

^cumulative^ requests the fitting of the continuatio-ratio cloglog model and
	the display of the cut-points of the equivalent ordered cloglog model.
	
^level(^#^)^ specifies the confidence level in percent, for confidence intervals.
	The default is ^level(95)^ or as set by @set level@.


Options for use with ^ocrpred^
- ----------------------------

^xb^ requests the linear predictor xB and one name should be supplied in
	newvarlist. This is the default if no options are specified.

^prob^ requests the predicted probabilties for each response category. There
	should be K names supplied in newvarlist where K is the value of $S_3
	(i.e. the number of response categories) from the previous ^ocratio^
	command. An easy way of doing this is by using ranges, e.g. if K=8, 
	ocrpred p1-p8, prob.


Examples
- --------
	. use auto.dta, clear
	. ^xi: ocratio rep78 i.foreign weight, link(probit) level(95)^
	. ^ocratio, level(90)^         /* Redisplay results with different CIs */
	. ^ocrpred pr1 pr2 pr3 pr4 pr5, prob^   /* Obtain fitted probabilities */


	. ologit rep78 weight                 /* Look at ordered logit model */
		/* Now fit ordered complementary-log-log model for comparison*/
	. ^ocratio rep78 weight, cumul link(clog)^


	. tab foreign rep78
	. ^xi: ocratio rep78 i.foreign, test^            /* Test coefficients. */
					          /* Now put data into 2-way */ 
	. gen obs=1                                   /* table of counts to  */ 
	. collapse (count) obs, by(rep78 foreign)     /* demonstrate use of  */
	. ^xi: ocratio rep78 i.foreign [fweight=obs], test^       /* fweights. */
	         /* and look at exponentiated coefficients, ie. odds ratios. */
	. ^ocratio, eform^ 


Saved results
- -------------

In addition to standard post-estimation results, ^ocratio^ saves in
the global ^S_^# macros:

	^S_1^    likelihood-ratio value for test of effect constancy assumption
	^S_2^    dof for likelihood-ratio test 
	^S_3^    number of distinct response categories (= no. of cut-points +1).

Note that S_1 and S_2 are only defined if the ^test^ option is provided.


Author
- ------

Rory Wolfe <wolfer@@cryptic.rch.unimelb.edu.au>, Royal Children's Hospital,
	Melbourne, Australia.

Also see
- --------

On-line:  help for @ologit@, @oprobit@, @ologitp@
