/* Diese Datei: ID_2006.sas (Februar 2012) ---------------------------------------------------------------------------- Programm zur Rekodierung doppelter Identifikatoren im Scientific Use File des Mikrozensus 2006: Nr. des Haushalts im Auswahlbezirk (EF4) und Nummer der Person im Haushalt (EF5a). Im Scientific Use File des Mikrozensus 2006 sind doppelte Identifikatoren (IDs, Ordnungsnummern) vorhanden. Dies betrifft ueberwiegend Haushalte des Jahresueberhangs (EF5b=1). Diese Gruppe konnte - vor allem aus Gruenden der Erreichbarkeit - nicht gemaess Stichprobenplan im Jahre 2005, sondern erst 2006 befragt werden. Bei den quartalsweisse durchgefuehrten Hochrechnungen und Haushaltsauswertungen sind solche Jahresueberhaenge im Grunde jeweils als eigener Haushalt zu definieren, selbst wenn im Erhebungsjahr 2006 eine weitere (regulaere) Befragung stattgefunden hat. Dies ist jedoch in den statistischen Aemtern nicht durchgaengig umgesetzt worden. Aus diesem Grund sind die in den Daten vorhandenen IDs zur Abgrenzung von Haushalten (EF3, EF4, EF5b, EF12) nicht immer eindeutig. Aufgrund nicht eindeutiger IDs sind des Weiteren bei der Ziehung der Substichprobe der zweiten Schicht fuer Personen mit Jahresueberhang Folgeprobleme aufgetreten. Teilweise sind die betreffenden Haushalte unvollstaendig. Z. B. koennen nicht fuer alle Haushalte Haushaltsbezugspersonen (EF37=1) oder Haupteinkommensbezieher des Haushalts (EF662>=1 & EF662<=4) ermittelt werden. Bei eigenen satzuebergreifenden Auswertungen auf der Ebene von Haushalten, Lebensformen oder Familien und der Konstruktion von abgeleiteten Variablen oder sogenannten Bandsatzerweiterungen, wie z. B. der Variablen Personen in Haushalt/Gemeinschaftsunterkunft: Anzahl (EF20), fuehrt dies zu abweichenden Ergebnissen und ggf. zu Fehlermeldungen oder Warnungen. Bei Korrekturen der doppelten IDs muss beachtet werden, dass die Angaben zu weiteren Personen im Haushalt und deren Ordnungsnummern (Ehepartner im Haushalt: EF50; Nr. des Ehepartners im Haushalt (EF51); (...) Lebenspartner einer Person im Haushalt (EF56); Nr. des Lebenspartners im Haushalt (EF57) moeglichst nicht veraendert werden. Vor Aenderungen der Variablen EF51 bis EF57 muss geprueft werden, dass keine gueltigen Angaben betroffen sind. Dies ist i. d. R. bei der Bevoelkerung in Gemeinschaftsunterkuenften (EF31=2) der Fall. Die unten stehenden Rekodierungen der Haushaltsnummer (EF4) basieren auf Dateninspektionen der folgenden Variablen: Nr. des Gebaeuudes im Auswahlbezirk (EF8), Nr. der Wohnung im Auswahlbezirk (EF9), Berichtsquartal (EF12), Bevoelkerung: Privathaushalte (EF31) und Personen im Haushalt: Anzahl (EF663) sowie den Angaben zu Haushaltszusammenhaengen (EF51 - EF57). Die Datenprobleme lassen sich nicht vollstaendig klaeren, aber immerhin koennen mithilfe der neuen Haushaltsnummer (EF4R) die Abweichungen zwischen der selbst ermittelten Haushaltsgroesse im Vergleich zur abgeleiteten Variablen EF663 von 2.240 Faellen vor der Plausibilisierung auf 637 Faelle reduziert werden. Im Anschluss an die Rekodierung der Haushaltsnummer (EF4R) erfolgt die Rekodierung der Personennummer (EF5aR). Die Variable ID_O enthaelt die Satznummer der Ausgangsdaten und kann fuer das Zusammenspielen der Daten mit den korrigierten Variablen und den Ausgangsdaten verwendet werden. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - URL: http://www.gesis.org/missy/fileadmin/missy/daten/mikrodaten_tools/Rekodierung_doppelter_Identifikatoren/ID_2006.sas E-Mail: gml[at]gesis.org --------------------------------------------------------------------------- */ OPTIONS NOFMTERR; RUN; * Daten- bzw. Arbeitsverzeichnis in <> eintragen; libname MZ06 '' ; /* Ausgangsdaten MZ 2006 mit Variablenauswahl einlesen Zur Abgrenzung eines Haushalts erforderliche Variablen - Variablenauswahl siehe http://www.gesis.org/missy/studie/arbeitshilfen/datenaufbereitung-analyse/identifikatoren-fuer-haushalte/ EF3 Nr. des Auswahlbezirks EF4 Nr. des Haushalts im Auswahlbezirk EF5b Jahresueberhang aus dem Vorjahr EF12 Berichtsquartal (bei der Verwendung von Jahresueberhaengen) EF5a Nr. der Person im Haushalt (systemfrei) */ data MZ06.temp ; set MZ06.mz2006 /* mz2006.sas7bdat */; ID_O = _n_ ; hhid = EF1*1000000000 + ef3*10000 + ef4*100 + ef5b*10 + ef12; Label ID_O ="[ID_O] Lfd. Satznummer Ausgangsfile mz2006.sas7bdat"; run ; /* SORTIERUNG 1: EF1 EF3 EF4 EF5b EF12 EF5a */ proc sort data=MZ06.temp; by hhid ID_O ; run; /* Erstellen der vorlaeufigen laufenden Haushaltsnummer bei Haushaltsabgrenzung nach Sortierung 1 (hhnr1) */ data MZ06.temp; set MZ06.temp; pnr + 1; by hhid; if first.hhid = 1 then pnr = 1; run; data work.tmp(keep=hhid hhnr1 pnr); set MZ06.temp ; where (pnr=1); hhnr1 = _n_; run; proc sort data=work.tmp; by hhid ; run; data MZ06.temp; merge MZ06.temp work.tmp ; by hhid; run; data MZ06.temp ; set MZ06.temp ; by hhid; ID1 = _n_ ; Label ID1 = 'Lfd. Satznummer nach Sortierung 1: EF1 EF3 EF4 EF5b EF12 EF5a' ; run; /* Rekodierung der vorlaeufigen Haushaltsnummer nach Dateninspektion und Ermittlung plausibler Haushaltszusammenhaenge */ data MZ06.temp ; set MZ06.temp; hhnr=hhnr1; if hhnr1 = 4 then hhnr = 3; if hhnr1 = 10 then hhnr = 9; if hhnr1 = 12 then hhnr = 11; if hhnr1 = 14 then hhnr = 13; if hhnr1 = 26 then hhnr = 25; if hhnr1 = 39 then hhnr = 38; if hhnr1 = 41 then hhnr = 40; if hhnr1 = 47 then hhnr = 48; if hhnr1 = 49 then hhnr = 50; if hhnr1 = 52 then hhnr = 51; if hhnr1 = 57 then hhnr = 56; if hhnr1 = 59 then hhnr = 58; if hhnr1 = 102 then hhnr = 101; if hhnr1 = 1187 then hhnr = 1186; if hhnr1 = 1189 then hhnr = 1188; if hhnr1 = 1191 then hhnr = 1190; if hhnr1 = 1193 then hhnr = 1192; if hhnr1 = 1198 then hhnr = 1197; if hhnr1 = 1201 then hhnr = 1200; if hhnr1 = 1203 then hhnr = 1202; if hhnr1 = 1837 then hhnr = 1838; if hhnr1 = 1871 then hhnr = 1870; if hhnr1 = 1873 then hhnr = 1872; if hhnr1 = 1881 then hhnr = 1880; if hhnr1 = 1883 then hhnr = 1882; if hhnr1 = 1887 then hhnr = 1886; if hhnr1 = 1888 then hhnr = 1889; if hhnr1 = 1893 then hhnr = 1892; if hhnr1 = 2084 then hhnr = 2083; if hhnr1 = 2338 then hhnr = 2337; if hhnr1 = 2352 then hhnr = 2351; if hhnr1 = 2417 then hhnr = 2418; if hhnr1 = 2490 then hhnr = 2489; if hhnr1 = 2494 then hhnr = 2493; if hhnr1 = 2503 then hhnr = 2502; if hhnr1 = 2509 then hhnr = 2508; if hhnr1 = 2518 then hhnr = 2519; if hhnr1 = 2713 then hhnr = 2712; if hhnr1 = 2968 then hhnr = 2967; if hhnr1 = 2978 then hhnr = 2977; if hhnr1 = 2980 then hhnr = 2979; if hhnr1 = 3028 then hhnr = 3027; if hhnr1 = 3242 then hhnr = 3241; if hhnr1 = 3280 then hhnr = 3279; if hhnr1 = 4480 then hhnr = 4479; if hhnr1 = 4496 then hhnr = 4495; if hhnr1 = 4567 then hhnr = 4566; if hhnr1 = 5271 then hhnr = 5270; if hhnr1 = 5276 then hhnr = 5275; if hhnr1 = 5378 then hhnr = 5377; if hhnr1 = 5407 then hhnr = 5408; if hhnr1 = 5819 then hhnr = 5818; if hhnr1 = 5871 then hhnr = 5870; if hhnr1 = 5908 then hhnr = 5909; if hhnr1 = 5912 then hhnr = 5911; if hhnr1 = 6010 then hhnr = 6009; if hhnr1 = 6224 then hhnr = 6223; if hhnr1 = 6243 then hhnr = 6242; if hhnr1 = 6335 then hhnr = 6334; if hhnr1 = 6527 then hhnr = 6526; if hhnr1 = 6629 then hhnr = 6628; if hhnr1 = 6856 then hhnr = 6855; if hhnr1 = 6858 then hhnr = 6857; if hhnr1 = 6860 then hhnr = 6859; if hhnr1 = 6863 then hhnr = 6862; if hhnr1 = 6871 then hhnr = 6870; if hhnr1 = 6873 then hhnr = 6872; if hhnr1 = 6931 then hhnr = 6932; if hhnr1 = 7008 then hhnr = 7007; if hhnr1 = 7247 then hhnr = 7246; if hhnr1 = 7249 then hhnr = 7248; if hhnr1 = 7250 then hhnr = 7251; if hhnr1 = 7258 then hhnr = 7257; if hhnr1 = 7298 then hhnr = 7297; if hhnr1 = 8148 then hhnr = 8147; if hhnr1 = 8288 then hhnr = 8287; if hhnr1 = 8647 then hhnr = 8646; if hhnr1 = 9070 then hhnr = 9069; if hhnr1 = 9424 then hhnr = 9423; if hhnr1 = 9604 then hhnr = 9603; if hhnr1 = 9605 then hhnr = 9606; if hhnr1 = 9620 then hhnr = 9619; if hhnr1 = 9634 then hhnr = 9635; if hhnr1 = 10671 then hhnr = 10670; if hhnr1 = 10853 then hhnr = 10854; if hhnr1 = 10914 then hhnr = 10913; if hhnr1 = 11214 then hhnr = 11213; if hhnr1 = 11441 then hhnr = 11442; if hhnr1 = 11448 then hhnr = 11447; if hhnr1 = 11870 then hhnr = 11869; if hhnr1 = 11872 then hhnr = 11871; if hhnr1 = 12293 then hhnr = 12292; if hhnr1 = 12370 then hhnr = 12369; if hhnr1 = 12449 then hhnr = 12448; if hhnr1 = 12452 then hhnr = 12451; if hhnr1 = 12596 then hhnr = 12595; if hhnr1 = 13798 then hhnr = 13797; if hhnr1 = 13801 then hhnr = 13800; if hhnr1 = 13818 then hhnr = 13819; if hhnr1 = 13999 then hhnr = 13998; if hhnr1 = 14422 then hhnr = 14421; if hhnr1 = 14877 then hhnr = 14876; if hhnr1 = 14940 then hhnr = 14939; if hhnr1 = 15296 then hhnr = 15295; if hhnr1 = 15298 then hhnr = 15299; if hhnr1 = 15301 then hhnr = 15300; if hhnr1 = 15303 then hhnr = 15302; if hhnr1 = 15874 then hhnr = 15873; if hhnr1 = 15906 then hhnr = 15905; if hhnr1 = 15908 then hhnr = 15907; if hhnr1 = 15914 then hhnr = 15913; if hhnr1 = 15915 then hhnr = 15916; if hhnr1 = 15920 then hhnr = 15921; if hhnr1 = 15923 then hhnr = 15922; if hhnr1 = 16060 then hhnr = 16061; if hhnr1 = 16063 then hhnr = 16064; if hhnr1 = 16066 then hhnr = 16065; if hhnr1 = 16185 then hhnr = 16184; if hhnr1 = 16685 then hhnr = 16686; if hhnr1 = 16693 then hhnr = 16692; if hhnr1 = 16696 then hhnr = 16695; if hhnr1 = 16723 then hhnr = 16722; if hhnr1 = 16726 then hhnr = 16725; if hhnr1 = 17052 then hhnr = 17051; if hhnr1 = 17371 then hhnr = 17370; if hhnr1 = 17808 then hhnr = 17807; if hhnr1 = 17951 then hhnr = 17950; if hhnr1 = 18080 then hhnr = 18079; if hhnr1 = 18221 then hhnr = 18220; if hhnr1 = 18223 then hhnr = 18222; if hhnr1 = 18320 then hhnr = 18319; if hhnr1 = 18322 then hhnr = 18321; if hhnr1 = 18503 then hhnr = 18504; if hhnr1 = 18684 then hhnr = 18683; if hhnr1 = 18739 then hhnr = 18738; if hhnr1 = 19188 then hhnr = 19187; if hhnr1 = 19904 then hhnr = 19903; if hhnr1 = 20483 then hhnr = 20484; if hhnr1 = 20577 then hhnr = 20576; if hhnr1 = 21053 then hhnr = 21052; if hhnr1 = 21335 then hhnr = 21336; if hhnr1 = 21470 then hhnr = 21469; if hhnr1 = 21504 then hhnr = 21503; if hhnr1 = 21751 then hhnr = 21750; if hhnr1 = 22013 then hhnr = 22012; if hhnr1 = 22016 then hhnr = 22015; if hhnr1 = 22139 then hhnr = 22138; if hhnr1 = 22248 then hhnr = 22249; if hhnr1 = 22339 then hhnr = 22340; if hhnr1 = 22346 then hhnr = 22345; if hhnr1 = 23890 then hhnr = 23889; if hhnr1 = 23966 then hhnr = 23965; if hhnr1 = 24843 then hhnr = 24842; if hhnr1 = 25350 then hhnr = 25349; if hhnr1 = 25884 then hhnr = 25883; if hhnr1 = 26125 then hhnr = 26124; if hhnr1 = 26155 then hhnr = 26154; if hhnr1 = 26244 then hhnr = 26243; if hhnr1 = 26246 then hhnr = 26245; if hhnr1 = 26584 then hhnr = 26583; if hhnr1 = 27549 then hhnr = 27548; if hhnr1 = 27671 then hhnr = 27670; if hhnr1 = 28202 then hhnr = 28201; if hhnr1 = 28257 then hhnr = 28256; if hhnr1 = 29846 then hhnr = 29845; if hhnr1 = 29959 then hhnr = 29958; if hhnr1 = 30273 then hhnr = 30272; if hhnr1 = 30536 then hhnr = 30535; if hhnr1 = 30539 then hhnr = 30540; if hhnr1 = 30901 then hhnr = 30902; if hhnr1 = 31003 then hhnr = 31002; if hhnr1 = 31012 then hhnr = 31011; if hhnr1 = 31242 then hhnr = 31241; if hhnr1 = 31397 then hhnr = 31398; if hhnr1 = 31453 then hhnr = 31452; if hhnr1 = 31508 then hhnr = 31507; if hhnr1 = 31683 then hhnr = 31682; if hhnr1 = 32229 then hhnr = 32228; if hhnr1 = 32235 then hhnr = 32234; if hhnr1 = 32448 then hhnr = 32449; if hhnr1 = 32452 then hhnr = 32451; if hhnr1 = 32460 then hhnr = 32459; if hhnr1 = 32915 then hhnr = 32914; if hhnr1 = 33012 then hhnr = 33011; if hhnr1 = 33157 then hhnr = 33156; if hhnr1 = 33215 then hhnr = 33214; if hhnr1 = 33222 then hhnr = 33221; if hhnr1 = 33280 then hhnr = 33279; if hhnr1 = 33380 then hhnr = 33379; if hhnr1 = 33705 then hhnr = 33704; if hhnr1 = 33930 then hhnr = 33931; if hhnr1 = 34103 then hhnr = 34104; if hhnr1 = 34109 then hhnr = 34108; if hhnr1 = 34539 then hhnr = 34538; if hhnr1 = 34671 then hhnr = 34670; if hhnr1 = 34767 then hhnr = 34766; if hhnr1 = 35056 then hhnr = 35055; if hhnr1 = 35061 then hhnr = 35060; if hhnr1 = 35331 then hhnr = 35330; if hhnr1 = 35342 then hhnr = 35341; if hhnr1 = 35353 then hhnr = 35352; if hhnr1 = 35443 then hhnr = 35442; if hhnr1 = 35620 then hhnr = 35621; if hhnr1 = 35629 then hhnr = 35628; if hhnr1 = 35729 then hhnr = 35728; if hhnr1 = 35825 then hhnr = 35824; if hhnr1 = 35855 then hhnr = 35854; if hhnr1 = 35952 then hhnr = 35951; if hhnr1 = 36034 then hhnr = 36033; if hhnr1 = 36041 then hhnr = 36040; if hhnr1 = 36108 then hhnr = 36107; if hhnr1 = 36111 then hhnr = 36110; if hhnr1 = 36426 then hhnr = 36427; if hhnr1 = 36561 then hhnr = 36562; if hhnr1 = 36705 then hhnr = 36704; if hhnr1 = 36708 then hhnr = 36707; if hhnr1 = 36734 then hhnr = 36735; if hhnr1 = 36796 then hhnr = 36795; if hhnr1 = 37063 then hhnr = 37064; if hhnr1 = 37086 then hhnr = 37085; if hhnr1 = 37407 then hhnr = 37406; if hhnr1 = 37558 then hhnr = 37559; if hhnr1 = 37880 then hhnr = 37879; if hhnr1 = 37886 then hhnr = 37887; if hhnr1 = 37899 then hhnr = 37898; if hhnr1 = 38258 then hhnr = 38259; if hhnr1 = 38416 then hhnr = 38415; if hhnr1 = 38458 then hhnr = 38457; if hhnr1 = 38470 then hhnr = 38469; if hhnr1 = 39208 then hhnr = 39207; if hhnr1 = 39292 then hhnr = 39291; if hhnr1 = 39310 then hhnr = 39309; if hhnr1 = 39334 then hhnr = 39333; if hhnr1 = 39349 then hhnr = 39350; if hhnr1 = 39419 then hhnr = 39418; if hhnr1 = 39565 then hhnr = 39566; if hhnr1 = 40095 then hhnr = 40094; if hhnr1 = 40132 then hhnr = 40131; if hhnr1 = 40219 then hhnr = 40218; if hhnr1 = 40227 then hhnr = 40226; if hhnr1 = 40408 then hhnr = 40407; if hhnr1 = 41313 then hhnr = 41312; if hhnr1 = 41366 then hhnr = 41365; if hhnr1 = 41383 then hhnr = 41382; if hhnr1 = 41960 then hhnr = 41959; if hhnr1 = 42040 then hhnr = 42039; if hhnr1 = 42286 then hhnr = 42285; if hhnr1 = 42540 then hhnr = 42539; if hhnr1 = 42608 then hhnr = 42607; if hhnr1 = 42729 then hhnr = 42728; if hhnr1 = 42751 then hhnr = 42750; if hhnr1 = 43013 then hhnr = 43012; if hhnr1 = 43334 then hhnr = 43333; if hhnr1 = 43349 then hhnr = 43350; if hhnr1 = 43631 then hhnr = 43632; if hhnr1 = 43886 then hhnr = 43885; if hhnr1 = 44248 then hhnr = 44247; if hhnr1 = 44432 then hhnr = 44431; if hhnr1 = 44444 then hhnr = 44445; if hhnr1 = 44447 then hhnr = 44446; if hhnr1 = 45207 then hhnr = 45206; if hhnr1 = 45282 then hhnr = 45281; if hhnr1 = 45397 then hhnr = 45396; if hhnr1 = 45430 then hhnr = 45429; if hhnr1 = 45503 then hhnr = 45502; if hhnr1 = 45627 then hhnr = 45626; if hhnr1 = 45755 then hhnr = 45754; if hhnr1 = 46171 then hhnr = 46170; if hhnr1 = 46355 then hhnr = 46354; if hhnr1 = 46369 then hhnr = 46368; if hhnr1 = 46371 then hhnr = 46370; if hhnr1 = 46875 then hhnr = 46874; if hhnr1 = 47198 then hhnr = 47197; if hhnr1 = 47692 then hhnr = 47691; if hhnr1 = 47805 then hhnr = 47804; if hhnr1 = 48065 then hhnr = 48064; if hhnr1 = 48088 then hhnr = 48087; if hhnr1 = 48290 then hhnr = 48289; if hhnr1 = 48440 then hhnr = 48439; if hhnr1 = 48452 then hhnr = 48451; if hhnr1 = 48545 then hhnr = 48544; if hhnr1 = 48566 then hhnr = 48565; if hhnr1 = 49071 then hhnr = 49070; if hhnr1 = 49125 then hhnr = 49124; if hhnr1 = 49381 then hhnr = 49382; if hhnr1 = 49421 then hhnr = 49420; if hhnr1 = 49779 then hhnr = 49778; if hhnr1 = 49784 then hhnr = 49783; if hhnr1 = 49789 then hhnr = 49788; if hhnr1 = 50380 then hhnr = 50379; if hhnr1 = 50382 then hhnr = 50381; if hhnr1 = 50883 then hhnr = 50882; if hhnr1 = 51129 then hhnr = 51128; if hhnr1 = 51160 then hhnr = 51161; if hhnr1 = 51591 then hhnr = 51590; if hhnr1 = 51656 then hhnr = 51655; if hhnr1 = 51785 then hhnr = 51786; if hhnr1 = 51789 then hhnr = 51788; if hhnr1 = 51835 then hhnr = 51836; if hhnr1 = 52119 then hhnr = 52118; if hhnr1 = 52187 then hhnr = 52186; if hhnr1 = 52484 then hhnr = 52483; if hhnr1 = 52645 then hhnr = 52644; if hhnr1 = 53068 then hhnr = 53067; if hhnr1 = 53336 then hhnr = 53337; if hhnr1 = 53341 then hhnr = 53340; if hhnr1 = 53417 then hhnr = 53418; if hhnr1 = 53791 then hhnr = 53790; if hhnr1 = 53804 then hhnr = 53803; if hhnr1 = 53949 then hhnr = 53948; if hhnr1 = 54054 then hhnr = 54053; if hhnr1 = 54330 then hhnr = 54331; if hhnr1 = 54332 then hhnr = 54333; if hhnr1 = 54687 then hhnr = 54688; if hhnr1 = 55071 then hhnr = 55070; if hhnr1 = 55075 then hhnr = 55074; if hhnr1 = 55387 then hhnr = 55386; if hhnr1 = 55542 then hhnr = 55541; if hhnr1 = 55749 then hhnr = 55748; if hhnr1 = 55751 then hhnr = 55750; if hhnr1 = 55986 then hhnr = 55985; if hhnr1 = 56321 then hhnr = 56322; if hhnr1 = 56447 then hhnr = 56446; if hhnr1 = 56621 then hhnr = 56620; if hhnr1 = 56623 then hhnr = 56622; if hhnr1 = 56770 then hhnr = 56769; if hhnr1 = 56792 then hhnr = 56791; if hhnr1 = 56807 then hhnr = 56806; if hhnr1 = 57246 then hhnr = 57247; if hhnr1 = 57515 then hhnr = 57516; if hhnr1 = 57628 then hhnr = 57629; if hhnr1 = 57635 then hhnr = 57634; if hhnr1 = 57648 then hhnr = 57647; if hhnr1 = 57861 then hhnr = 57860; if hhnr1 = 58087 then hhnr = 58086; if hhnr1 = 58089 then hhnr = 58088; if hhnr1 = 58238 then hhnr = 58237; if hhnr1 = 58487 then hhnr = 58486; if hhnr1 = 58528 then hhnr = 58527; if hhnr1 = 58863 then hhnr = 58862; if hhnr1 = 58894 then hhnr = 58893; if hhnr1 = 59032 then hhnr = 59031; if hhnr1 = 59380 then hhnr = 59379; if hhnr1 = 59818 then hhnr = 59817; if hhnr1 = 60191 then hhnr = 60190; if hhnr1 = 60559 then hhnr = 60558; if hhnr1 = 60816 then hhnr = 60815; if hhnr1 = 60954 then hhnr = 60953; if hhnr1 = 61402 then hhnr = 61401; if hhnr1 = 61638 then hhnr = 61637; if hhnr1 = 61791 then hhnr = 61792; if hhnr1 = 64047 then hhnr = 64046; if hhnr1 = 64189 then hhnr = 64188; if hhnr1 = 64220 then hhnr = 64219; if hhnr1 = 64658 then hhnr = 64657; if hhnr1 = 64750 then hhnr = 64749; if hhnr1 = 65394 then hhnr = 65393; if hhnr1 = 68230 then hhnr = 68229; if hhnr1 = 68474 then hhnr = 68473; if hhnr1 = 69271 then hhnr = 69270; if hhnr1 = 69488 then hhnr = 69487; if hhnr1 = 69624 then hhnr = 69623; if hhnr1 = 69628 then hhnr = 69627; if hhnr1 = 69712 then hhnr = 69711; if hhnr1 = 70413 then hhnr = 70412; if hhnr1 = 70790 then hhnr = 70789; if hhnr1 = 70843 then hhnr = 70842; if hhnr1 = 71269 then hhnr = 71268; if hhnr1 = 71284 then hhnr = 71283; if hhnr1 = 71776 then hhnr = 71775; if hhnr1 = 71866 then hhnr = 71865; if hhnr1 = 72889 then hhnr = 72888; if hhnr1 = 73001 then hhnr = 73002; if hhnr1 = 73290 then hhnr = 73289; if hhnr1 = 73398 then hhnr = 73397; if hhnr1 = 73506 then hhnr = 73505; if hhnr1 = 73949 then hhnr = 73948; if hhnr1 = 74106 then hhnr = 74105; if hhnr1 = 74690 then hhnr = 74689; if hhnr1 = 74833 then hhnr = 74834; if hhnr1 = 75015 then hhnr = 75014; if hhnr1 = 75145 then hhnr = 75144; if hhnr1 = 75319 then hhnr = 75320; if hhnr1 = 76731 then hhnr = 76730; if hhnr1 = 77151 then hhnr = 77150; if hhnr1 = 79633 then hhnr = 79632; if hhnr1 = 80223 then hhnr = 80222; if hhnr1 = 80374 then hhnr = 80375; if hhnr1 = 80939 then hhnr = 80938; if hhnr1 = 81114 then hhnr = 81113; if hhnr1 = 81116 then hhnr = 81117; if hhnr1 = 84667 then hhnr = 84666; if hhnr1 = 87046 then hhnr = 87047; if hhnr1 = 87377 then hhnr = 87376; if hhnr1 = 87661 then hhnr = 87660; if hhnr1 = 87765 then hhnr = 87764; if hhnr1 = 88003 then hhnr = 88002; if hhnr1 = 95037 then hhnr = 95036; if hhnr1 = 95112 then hhnr = 95111; if hhnr1 = 95521 then hhnr = 95520; if hhnr1 = 95532 then hhnr = 95531; if hhnr1 = 95535 then hhnr = 95536; if hhnr1 = 95538 then hhnr = 95537; if hhnr1 = 95540 then hhnr = 95539; if hhnr1 = 95580 then hhnr = 95579; if hhnr1 = 95653 then hhnr = 95652; if hhnr1 = 95657 then hhnr = 95656; if hhnr1 = 95665 then hhnr = 95664; if hhnr1 = 95672 then hhnr = 95673; if hhnr1 = 95693 then hhnr = 95692; if hhnr1 = 95722 then hhnr = 95721; if hhnr1 = 95855 then hhnr = 95854; if hhnr1 = 95857 then hhnr = 95856; if hhnr1 = 96018 then hhnr = 96017; if hhnr1 = 96031 then hhnr = 96030; if hhnr1 = 96033 then hhnr = 96032; if hhnr1 = 96109 then hhnr = 96108; if hhnr1 = 96256 then hhnr = 96255; if hhnr1 = 96286 then hhnr = 96285; if hhnr1 = 96379 then hhnr = 96378; if hhnr1 = 96385 then hhnr = 96384; if hhnr1 = 96488 then hhnr = 96487; if hhnr1 = 96498 then hhnr = 96497; if hhnr1 = 96504 then hhnr = 96503; if hhnr1 = 96618 then hhnr = 96617; if hhnr1 = 96714 then hhnr = 96713; if hhnr1 = 96717 then hhnr = 96716; if hhnr1 = 96728 then hhnr = 96727; if hhnr1 = 96729 then hhnr = 96730; if hhnr1 = 96761 then hhnr = 96762; if hhnr1 = 96988 then hhnr = 96987; if hhnr1 = 97184 then hhnr = 97185; if hhnr1 = 97515 then hhnr = 97514; if hhnr1 = 97825 then hhnr = 97824; if hhnr1 = 97946 then hhnr = 97945; if hhnr1 = 97987 then hhnr = 97986; if hhnr1 = 97995 then hhnr = 97994; if hhnr1 = 97998 then hhnr = 97997; if hhnr1 = 98002 then hhnr = 98001; if hhnr1 = 98121 then hhnr = 98120; if hhnr1 = 98238 then hhnr = 98237; if hhnr1 = 98243 then hhnr = 98242; if hhnr1 = 98245 then hhnr = 98244; if hhnr1 = 98248 then hhnr = 98247; if hhnr1 = 98265 then hhnr = 98266; if hhnr1 = 98386 then hhnr = 98385; if hhnr1 = 98419 then hhnr = 98418; if hhnr1 = 98646 then hhnr = 98645; if hhnr1 = 98719 then hhnr = 98720; if hhnr1 = 98930 then hhnr = 98929; if hhnr1 = 99105 then hhnr = 99106; if hhnr1 = 99210 then hhnr = 99209; if hhnr1 = 99833 then hhnr = 99832; if hhnr1 = 99835 then hhnr = 99834; if hhnr1 = 99849 then hhnr = 99848; if hhnr1 = 99851 then hhnr = 99850; if hhnr1 = 99943 then hhnr = 99942; if hhnr1 = 100025 then hhnr = 100024; if hhnr1 = 100223 then hhnr = 100222; if hhnr1 = 100316 then hhnr = 100315; if hhnr1 = 100808 then hhnr = 100807; if hhnr1 = 100810 then hhnr = 100811; if hhnr1 = 100818 then hhnr = 100817; if hhnr1 = 101014 then hhnr = 101013; if hhnr1 = 101132 then hhnr = 101131; if hhnr1 = 101138 then hhnr = 101137; if hhnr1 = 101286 then hhnr = 101285; if hhnr1 = 101345 then hhnr = 101344; if hhnr1 = 101348 then hhnr = 101347; if hhnr1 = 101358 then hhnr = 101357; if hhnr1 = 101405 then hhnr = 101404; if hhnr1 = 101487 then hhnr = 101486; if hhnr1 = 101489 then hhnr = 101490; if hhnr1 = 101626 then hhnr = 101625; if hhnr1 = 101629 then hhnr = 101628; if hhnr1 = 101958 then hhnr = 101957; if hhnr1 = 102023 then hhnr = 102024; if hhnr1 = 102088 then hhnr = 102087; if hhnr1 = 102147 then hhnr = 102146; if hhnr1 = 102335 then hhnr = 102336; if hhnr1 = 102493 then hhnr = 102492; if hhnr1 = 102618 then hhnr = 102617; if hhnr1 = 102629 then hhnr = 102628; if hhnr1 = 102767 then hhnr = 102766; if hhnr1 = 102824 then hhnr = 102823; if hhnr1 = 102953 then hhnr = 102952; if hhnr1 = 102959 then hhnr = 102958; if hhnr1 = 102983 then hhnr = 102982; if hhnr1 = 103227 then hhnr = 103226; if hhnr1 = 103230 then hhnr = 103231; if hhnr1 = 103547 then hhnr = 103548; if hhnr1 = 103734 then hhnr = 103733; if hhnr1 = 104651 then hhnr = 104650; if hhnr1 = 104657 then hhnr = 104656; if hhnr1 = 105099 then hhnr = 105098; if hhnr1 = 105132 then hhnr = 105131; if hhnr1 = 105330 then hhnr = 105329; if hhnr1 = 105419 then hhnr = 105418; if hhnr1 = 105456 then hhnr = 105455; if hhnr1 = 105522 then hhnr = 105521; if hhnr1 = 106190 then hhnr = 106189; if hhnr1 = 106550 then hhnr = 106549; if hhnr1 = 106555 then hhnr = 106554; if hhnr1 = 106938 then hhnr = 106937; if hhnr1 = 107149 then hhnr = 107150; if hhnr1 = 107189 then hhnr = 107188; if hhnr1 = 107192 then hhnr = 107191; if hhnr1 = 107401 then hhnr = 107400; if hhnr1 = 107483 then hhnr = 107482; if hhnr1 = 107538 then hhnr = 107537; if hhnr1 = 107875 then hhnr = 107874; if hhnr1 = 107879 then hhnr = 107878; if hhnr1 = 107881 then hhnr = 107880; if hhnr1 = 107885 then hhnr = 107884; if hhnr1 = 107984 then hhnr = 107983; if hhnr1 = 108145 then hhnr = 108146; if hhnr1 = 108382 then hhnr = 108381; if hhnr1 = 108609 then hhnr = 108608; if hhnr1 = 108655 then hhnr = 108654; if hhnr1 = 108657 then hhnr = 108656; if hhnr1 = 108662 then hhnr = 108661; if hhnr1 = 108665 then hhnr = 108664; if hhnr1 = 108670 then hhnr = 108669; if hhnr1 = 108673 then hhnr = 108672; if hhnr1 = 108840 then hhnr = 108839; if hhnr1 = 110375 then hhnr = 110374; if hhnr1 = 110998 then hhnr = 110997; if hhnr1 = 111165 then hhnr = 111164; if hhnr1 = 111185 then hhnr = 111184; if hhnr1 = 111319 then hhnr = 111318; if hhnr1 = 111794 then hhnr = 111793; if hhnr1 = 112097 then hhnr = 112096; if hhnr1 = 112099 then hhnr = 112098; if hhnr1 = 117524 then hhnr = 117525; if hhnr1 = 117678 then hhnr = 117679; if hhnr1 = 117681 then hhnr = 117680; if hhnr1 = 117683 then hhnr = 117682; if hhnr1 = 117684 then hhnr = 117685; if hhnr1 = 117688 then hhnr = 117687; if hhnr1 = 117691 then hhnr = 117690; if hhnr1 = 117696 then hhnr = 117695; if hhnr1 = 117698 then hhnr = 117699; if hhnr1 = 117846 then hhnr = 117845; if hhnr1 = 118204 then hhnr = 118205; if hhnr1 = 118291 then hhnr = 118292; if hhnr1 = 118361 then hhnr = 118360; if hhnr1 = 118612 then hhnr = 118611; if hhnr1 = 118706 then hhnr = 118707; if hhnr1 = 118710 then hhnr = 118709; if hhnr1 = 118715 then hhnr = 118714; if hhnr1 = 118940 then hhnr = 118939; if hhnr1 = 119164 then hhnr = 119163; if hhnr1 = 119285 then hhnr = 119284; if hhnr1 = 119390 then hhnr = 119389; if hhnr1 = 119543 then hhnr = 119542; if hhnr1 = 119547 then hhnr = 119546; if hhnr1 = 120773 then hhnr = 120772; if hhnr1 = 120810 then hhnr = 120809; if hhnr1 = 121229 then hhnr = 121230; if hhnr1 = 121447 then hhnr = 121446; if hhnr1 = 122387 then hhnr = 122386; if hhnr1 = 122604 then hhnr = 122603; if hhnr1 = 122606 then hhnr = 122605; if hhnr1 = 123327 then hhnr = 123326; if hhnr1 = 123330 then hhnr = 123329; if hhnr1 = 123687 then hhnr = 123686; if hhnr1 = 123820 then hhnr = 123819; if hhnr1 = 124301 then hhnr = 124300; if hhnr1 = 124308 then hhnr = 124307; if hhnr1 = 124563 then hhnr = 124564; if hhnr1 = 124572 then hhnr = 124571; if hhnr1 = 125018 then hhnr = 125019; if hhnr1 = 125216 then hhnr = 125215; if hhnr1 = 125393 then hhnr = 125392; if hhnr1 = 125542 then hhnr = 125541; if hhnr1 = 125628 then hhnr = 125627; if hhnr1 = 126200 then hhnr = 126199; if hhnr1 = 126408 then hhnr = 126407; if hhnr1 = 126421 then hhnr = 126420; if hhnr1 = 126430 then hhnr = 126431; if hhnr1 = 126434 then hhnr = 126433; if hhnr1 = 126437 then hhnr = 126438; if hhnr1 = 126496 then hhnr = 126495; if hhnr1 = 126525 then hhnr = 126524; if hhnr1 = 126546 then hhnr = 126545; if hhnr1 = 126836 then hhnr = 126835; if hhnr1 = 126840 then hhnr = 126839; if hhnr1 = 126879 then hhnr = 126878; if hhnr1 = 127325 then hhnr = 127324; if hhnr1 = 127783 then hhnr = 127782; if hhnr1 = 128821 then hhnr = 128820; if hhnr1 = 129328 then hhnr = 129327; if hhnr1 = 130731 then hhnr = 130730; if hhnr1 = 130753 then hhnr = 130752; if hhnr1 = 130757 then hhnr = 130758; if hhnr1 = 130764 then hhnr = 130763; if hhnr1 = 131063 then hhnr = 131062; if hhnr1 = 131306 then hhnr = 131305; if hhnr1 = 131498 then hhnr = 131497; if hhnr1 = 131766 then hhnr = 131765; if hhnr1 = 132044 then hhnr = 132045; if hhnr1 = 132920 then hhnr = 132919; if hhnr1 = 133559 then hhnr = 133558; if hhnr1 = 134300 then hhnr = 134299; if hhnr1 = 134489 then hhnr = 134488; if hhnr1 = 135168 then hhnr = 135169; if hhnr1 = 135348 then hhnr = 135349; if hhnr1 = 135354 then hhnr = 135353; if hhnr1 = 136166 then hhnr = 136165; if hhnr1 = 136662 then hhnr = 136661; if hhnr1 = 136865 then hhnr = 136864; if hhnr1 = 137088 then hhnr = 137087; if hhnr1 = 137277 then hhnr = 137276; if hhnr1 = 199105 then hhnr = 199106; if hhnr1 = 201449 then hhnr = 201450; if hhnr1 = 201704 then hhnr = 201703; if hhnr1 = 201891 then hhnr = 201890; if hhnr1 = 202319 then hhnr = 202318; if hhnr1 = 202783 then hhnr = 202784; if hhnr1 = 202792 then hhnr = 202791; if hhnr1 = 203184 then hhnr = 203183; if hhnr1 = 203587 then hhnr = 203586; if hhnr1 = 203589 then hhnr = 203590; if hhnr1 = 203946 then hhnr = 203945; if hhnr1 = 204262 then hhnr = 204263; if hhnr1 = 204265 then hhnr = 204264; if hhnr1 = 204438 then hhnr = 204437; if hhnr1 = 204442 then hhnr = 204441; if hhnr1 = 204967 then hhnr = 204966; if hhnr1 = 205355 then hhnr = 205354; if hhnr1 = 205358 then hhnr = 205357; if hhnr1 = 205361 then hhnr = 205360; if hhnr1 = 205519 then hhnr = 205518; if hhnr1 = 205539 then hhnr = 205538; if hhnr1 = 205808 then hhnr = 205807; if hhnr1 = 207256 then hhnr = 207255; if hhnr1 = 207732 then hhnr = 207731; if hhnr1 = 207774 then hhnr = 207773; if hhnr1 = 208116 then hhnr = 208115; if hhnr1 = 208163 then hhnr = 208162; if hhnr1 = 210120 then hhnr = 210119; if hhnr1 = 212873 then hhnr = 212872; if hhnr1 = 213200 then hhnr = 213199; if hhnr1 = 215139 then hhnr = 215140; if hhnr1 = 215242 then hhnr = 215241; if hhnr1 = 215485 then hhnr = 215484; if hhnr1 = 215487 then hhnr = 215488; if hhnr1 = 215822 then hhnr = 215821; if hhnr1 = 215882 then hhnr = 215883; if hhnr1 = 216055 then hhnr = 216054; if hhnr1 = 216386 then hhnr = 216385; if hhnr1 = 216419 then hhnr = 216418; if hhnr1 = 216423 then hhnr = 216422; if hhnr1 = 216941 then hhnr = 216940; if hhnr1 = 216973 then hhnr = 216972; if hhnr1 = 217214 then hhnr = 217213; if hhnr1 = 217748 then hhnr = 217747; if hhnr1 = 218287 then hhnr = 218286; if hhnr1 = 218969 then hhnr = 218970; if hhnr1 = 218978 then hhnr = 218977; if hhnr1 = 219353 then hhnr = 219352; if hhnr1 = 219850 then hhnr = 219849; if hhnr1 = 220247 then hhnr = 220248; if hhnr1 = 220634 then hhnr = 220633; if hhnr1 = 221436 then hhnr = 221437; if hhnr1 = 221677 then hhnr = 221676; if hhnr1 = 221948 then hhnr = 221947; if hhnr1 = 235264 then hhnr = 235263; /* Korrektur von Haushalten mit 2 Haupteinkommensbeziehern oder 2 Bezugspersonen ID_Org hhnr1 ID1 EF1 EF3 EF4 EF5a => HHNR 184265 88385 184943 5 17197 2 1 => 88385 184266 88385 184944 5 17197 2 1 => 88386 259433 132614 277478 9 25235 4 1 => 132615 259434 132614 277479 9 25235 4 1 => 132616 */ if (hhnr1>88385) then hhnr=hhnr+1; if (hhnr1=88385 & ID1=184944) then hhnr=88386; if (hhnr1=88385 & ID1=184944) then pnr =1; if (hhnr1>132614) then hhnr=hhnr+1; if (hhnr1=132614 & ID1=277479) then hhnr=hhnr+1; if (hhnr1=132614 & ID1=277479) then pnr =1; * Label hhnr = '[hhnr] Lfd. Haushaltsnummer bei Sortierung EF1 EF3 EF4 EF5b EF12 - plausibilisiert'; run; /* EF4R: Nr. des Haushalts im Auswahlbezirk (systemfrei) - plausibilisiert */ data MZ06.temp; set MZ06.temp; if ( (_n_ = 1) | (EF3 ^= lag(EF3)) ) then EF4R = 1; if (_n_ > 1 & EF3 = lag(EF3) & hhnr ^= lag(hhnr)) then do; EF4R +1; end; /* REKODIERUNG DOPPELTER PERSONENNUMMERN (EF5a) ID1 EF4R EF1 EF3 EF4 EF5a EF5b EF12 EF20 EF31 EF44 EF46 146456 5 3 12791 5 1 1 2 5 2 16 2 146457 5 3 12791 5 3 1 2 5 2 13 1 146458 5 3 12791 5 4 1 2 5 2 15 1 146459 6 3 12791 5 5 1 4 5 2 15 1 146460 6 3 12791 5 5 1 4 5 2 15 1 <=== Korrektur EF5a Nr. der Person im Haushalt (systemfrei) */ EF5aR = EF5a; if (ID1=146460 & EF3=12791 & EF4R=6 & EF5a=5) then EF5aR = 6; run; /* Datei mit revidierter Haushalts- (EF4R) und Personennummer (EF5R) speichern */ data MZ06.mz2006r; retain ID_O EF1 EF3 EF4 EF4R EF5a EF5aR EF5b EF12; set MZ06.temp (drop = hhid pnr hhnr1 ID1 hhnr); Label ID_O = '[ID_O] Lfd. Satznummer Ausgangsfile mz2006'; Label EF1 = '[EF1] Bundesland'; Label EF3 = '[EF3] Nr. des Auswahlbezirks (systemfrei)'; Label EF4 = '[EF4] Nr. des Haushalts im Auswahlbezirk (systemfrei) - Originalvariable'; Label EF4R = '[EF4R] Nr. des Haushalts im Auswahlbezirk (systemfrei) - plausibilisiert'; Label EF5a = '[EF5a] Nr. der Person im Haushalt (EF5a) - Originalvariable'; Label EF5aR = '[EF5aR] Nr. der Person im Haushalt (EF5a) - plausibilisiert'; Label EF5b = '[EF5b] Jahresüberhang aus dem Vorjahr'; label EF12 = '[EF12] Berichtsquartal'; run;