11.07.2015 Views

[U] User's Guide

[U] User's Guide

[U] User's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

306 [ U ] 20 Estimation and postestimation commands20.18.1 Frequency weightsFrequency weights—fweights—are integers and are nothing more than replication counts. Theweight is statistically uninteresting, but from a data processing perspective it is important. Considerthe following datay x1 x222 1 022 1 022 1 123 0 123 0 123 0 1and the estimation command. regress y x1 x2Equivalent is the following, more compressed datay x1 x2 pop22 1 0 222 1 1 123 0 1 3and the corresponding estimation command. regress y x1 x2 [fweight=pop]When you specify frequency weights, you are treating each observation as one or more real observations.Technical noteYou might occasionally run across a command that does not allow weights at all, especiallyamong user-written commands. expand (see [D] expand) can be used with such commands to obtainfrequency-weighted results. The expand command duplicates observations so that the data becomeself-weighting. Suppose that you want to run the command usercmd, which does something or other,and you would like to type usercmd y x1 x2 [fw=pop]. Unfortunately, usercmd does not allowweights. Instead, you type. expand pop. usercmd y x1 x2to obtain your result. Moreover, there is an important principle here: the results of running anycommand with frequency weights should be the same as running the command on the unweighted,expanded data. Unweighted, duplicated data and frequency-weighted data are merely two ways ofrecording identical information.

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

Saved successfully!

Ooh no, something went wrong!