11.07.2015 Views

[U] User's Guide

[U] User's Guide

[U] User's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

[ U ] 20.18 Weighted estimation 305To use robust, you first produce conventional results (a vector of coefficients and covariancematrix) along with a variable containing the scores u j (or variables if the likelihood function has morethan one stub). You then call robust, and it will transform your conventional variance estimate intothe robust estimate. robust will handle the work associated with clustering and the details of thefinite-sample adjustment, and it will even label your output so that the word Robust appears abovethe standard error when the results are displayed.Of course, this is all even easier if you write your commands with Stata’s ml maximum likelihoodoptimization, in which case you merely pass the vce(robust) option on to ml. ml will then callrobust itself and do all the work for you.Technical noteFor some estimation commands, predict, score computes parameter-level scores ∂L j /∂βinstead of equation-level scores ∂L j /∂x j β. Those commands areasclogitasmprobitasroprobitnlogitstcoxstcrregThese models share the characteristic that there are multiple observations per independent event.In making the robust variance calculation, what are really needed are parameter-level scores∂L j /∂β, and so you may be asking yourself why predict, score does not always produceparameter-level scores. In the usual case we can obtain them from equation-level scores via the chainrule, and fewer variables are required if we adopt this approach. In the cases above, however, thelikelihood is calculated at the group level and is not split into contributions from the individualobservations. Thus the chain rule cannot be used and we must use the parameter level scores directly.robust can be tricked into using them if each parameter appears to be in its own equation as aconstant. This requires resetting the row and column stripes on the covariance matrix before robustis called. The equation names for each row and column must each be unique and the variable namesmust all be cons.20.18 Weighted estimation[U] 11.1.6 weight introduced the syntax for weights. Stata provides four kinds of weights: fweights,or frequency weights; pweights, or sampling weights; aweights, or analytic weights; and iweights,or importance weights. The syntax for using each is the same. Type. regress y x1 x2and you obtain unweighted estimates; type. regress y x1 x2 [pweight=pop]and you obtain (in this example) pweighted estimation.The sections below explain how each type of weight is used in estimation.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!