* Gewichtungsfaktoren fuer Laengschnitte 84-97 + Rgroups * ------------------------------------------------------ * ATTENTION: This Do-File automatically installs * Stata-Ados from the Internet. Comment the section * "Cool-Ados" if you want to install them by hand! version 7.0 clear set memory 30m set more off *+--------------------------------+ *| INSTALLATION VON ZUSATZMODULEN | *+--------------------------------+ * COOL-ADOS: Diese Ados werden im Folgenden automatisch über das * Internet geladen und installiert. * Das setzt natürlich voraus, dass ihr Rechner eine feste Verbindung * zum Internet hat. Sollte dies nicht der Fall sein müssen Sie die * entsprechenden Ados von Hand installieren. Hinweise hierzu in * Kohler/Kreuter (2001) capture which soepren if _rc ~= 0 { net from http://www.sowi.uni-mannheim.de/lehrstuehle/lesas/ado net install soepren } * +--------+ * |Retrival| * +--------+ use persnr apdesreg /* */ prgroup /* */ aphrf bphrf cphrf dphrf ephrf fphrf gphrf hphrf iphrf jphrf kphrf /* */ lphrf mphrf nphrf ophrf pphrf /* */ bpbleib cpbleib dpbleib epbleib fpbleib gpbleib hpbleib /* */ ipbleib jpbleib kpbleib lpbleib mpbleib npbleib opbleib ppbleib /* */ using $soepdir/phrf * +---------------------------------+ * |Rename - it's easier to work with| * +---------------------------------+ soepren ?phrf, new(hrf) waves(84/99) soepren ?pbleib, new(bleib) waves(85/99) * +----------------+ * |Balanced Weights| * +----------------+ gen double bw = apdesreg forvalues i=85/99 { replace bw = bw * bleib`i' } lab var bw "Weights, Balanced Panel-Design 84-97" * +------------------+ * |Unbalanced weights| * +------------------+ gen double uw = 0 gen mark = . forvalues k=99(-1)84 { forvalues i=84/`k' { replace mark = uw==0 replace uw = hrf`i' if uw == 0 local start = `i'+1 forvalues j=`start'/`k' { replace uw = uw * bleib`j' if mark } } } lab var uw "Weights, Unbalanced Panel-Design 84-97" keep persnr bw uw prgroup sort persnr save weights, replace exit