help oeratio-------------------------------------------------------------------------------

Title

oeratio-- ratio of observed to expected outcomes

Syntax

oeratio[{depvar predictvar}] [if] [in] [,options]

optionsDescription ------------------------------------------------------------------------- Mainseonlysuppress the display; calculate only the standard error; programmer's optionlevel(#)specify confidence level; if not specified system default is used. -------------------------------------------------------------------------byis allowed; see[D] by.

Description

oeratiocalculates the ratio of the number of observed and expected outcomes of note. Ifdepvarandpredictvar(the variable specifying the individual probability of a positive outcome for each subject) are not specified, the command must follow alogitorlogisticcommand.

Options+------+ ----+ Main +-------------------------------------------------------------

seonlyrestricts the calculation to only make calculations required to generate the standard error and ratio of observed to expected outcomes.

levelset the confidence level. If not specified, the default confidence level is used; see[R] level.

RemarksThe variance is calculated using the Bernoulli distribution: that is if p is the prediction variable: variance = sum(p*(1-p)). In its current form the standard error, confidence intervals and z-score calculated do not take into account the error of the model.

This command was developed in order to calculate the standardized mortality ratio (SMR) for intensive care units (ICU) when applying logistic mortality prediction models such as MPM, APACHE, PRISM or PIM models to unit data as part of benchmarking procedures.

Examples--------------------------------------------------------------------------- Setup

. webuse lbw2Logistic regression on even records. logit low age lwt race2 race3 smoke ptl ht ui if mod(id,2)==0Ratio of observed to expected outcomes when model applied to odd records. oeratio if mod(id,2)==1--------------------------------------------------------------------------- externally validated logistic regression model covariates applied to lbw data. generate p = invlogit(-2 + (0.05* age)). oeratio low p---------------------------------------------------------------------------

Saved Results

logitsaves the following inr():Scalars

r(N)number of observationsr(predicted)number of outcomes predictede(obs)number of outcomes observede(ratio)ratio of observed to predicted outcomese(se)standard errore(z)z score of the difference between observed and predicted outcome

Also seeCalculating standardised mortality

rate(as opposed toratio)[ST]stptime;