100% tevredenheidsgarantie Direct beschikbaar na betaling Zowel online als in PDF Je zit nergens aan vast
logo-home
Examenopdracht €6,49
In winkelwagen

Tentamen (uitwerkingen)

Examenopdracht

 50 keer bekeken  0 keer verkocht

Volledige examenopdracht die als leidraad kan worden gebruikt bij het maken van de oefening.

Voorbeeld 3 van de 16  pagina's

  • 26 november 2019
  • 16
  • 2018/2019
  • Tentamen (uitwerkingen)
  • Antwoorden
Alle documenten voor dit vak (11)
avatar-seller
clairevanroey
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 /********** DEEL 1: DATABEHEER **********
74 *****************************************
75
76
77
78 *Controle intividuele variabelen
79 ********************************/
80
81
82 data ess2;
83 set "/folders/myfolders/ess2e03_3.sas7bdat";
84 run;

NOTE: Format EDLVAGB was not found or could not be loaded.
NOTE: There were 47537 observations read from the data set /folders/myfolders/ess2e03_3.sas7bdat.
NOTE: The data set WORK.ESS2 has 47537 observations and 603 variables.
NOTE: DATA statement used (Total process time):
real time 6.11 seconds
cpu time 3.61 seconds


85
86
87
88 proc freq data = ess2;
89 tables CNTRY DOMICIL AGEA HINCTNT EDULVLA HEALTH UEMP12M;
90 run;

NOTE: There were 47537 observations read from the data set WORK.ESS2.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.75 seconds
cpu time 0.55 seconds


91
92 proc freq data = ess2;
93 tables CNTRY DOMICIL AGEA HINCTNT EDULVLA HEALTH UEMP12M;
94 format CNTRY DOMICIL AGEA HINCTNT EDULVLA HEALTH UEMP12M;
95 run;

NOTE: There were 47537 observations read from the data set WORK.ESS2.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.59 seconds
cpu time 0.53 seconds


96
97
98
99 *HEALTH omkeren.
100 ****************;
101
102
103 data ess2;
104 set ess2;
105 HEALTHRev = 6 - HEALTH;
106 label HEALTHRev = "Subjective general healt - Reversed";
107 run;

NOTE: Format EDLVAGB was not found or could not be loaded.
NOTE: Missing values were generated as a result of performing an operation on missing values.
Each place is given by: (Number of times) at (Line):(Column).
78 at 105:15
NOTE: There were 47537 observations read from the data set WORK.ESS2.
NOTE: The data set WORK.ESS2 has 47537 observations and 604 variables.
NOTE: DATA statement used (Total process time):
real time 4.06 seconds
cpu time 3.16 seconds


108
109
110
111 proc freq data = ess2;
112 tables HEALTHRev;
113 run;

,NOTE: There were 47537 observations read from the data set WORK.ESS2.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.14 seconds
cpu time 0.12 seconds


114
115
116
117 *DOMICIL dummyficeren ("Country village" als referentiecategorie).
118 ******************************************************************;
119
120
121 data ess2;
122 set ess2;
123
124 D1DOMICIL = (DOMICIL = 1);
125 if DOMICIL < 0 then D1DOMICIL = .;
126 D2DOMICIL = (DOMICIL = 2);
127 if DOMICIL < 0 then D2DOMICIL = .;
128 D3DOMICIL = (DOMICIL = 3);
129 if DOMICIL < 0 then D3DOMICIL = .;
130 D4DOMICIL = (DOMICIL = 5);
131 if DOMICIL < 0 then D4DOMICIL = .;
132
133 labelD1DOMICIL = "Big city - dummy"
134 D2DOMICIL = "Suburbs - dummy"
135 D3DOMICIL = "Town or small city - dummy"
136 D4DOMICIL = "Farm or home in countryside - dummy";
137
138 run;

NOTE: Format EDLVAGB was not found or could not be loaded.
NOTE: There were 47537 observations read from the data set WORK.ESS2.
NOTE: The data set WORK.ESS2 has 47537 observations and 608 variables.
NOTE: DATA statement used (Total process time):
real time 3.88 seconds
cpu time 2.78 seconds


139
140
141
142 proc freq data = ess2;
143 tables D1DOMICIL D2DOMICIL D3DOMICIL D4DOMICIL;
144 run;

NOTE: There were 47537 observations read from the data set WORK.ESS2.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.24 seconds
cpu time 0.22 seconds


145
146
147
148 *EDULVLA hercoderen.
149 ********************;
150
151
152 proc format;
153 value EDULVLARecfmt
154 1 = "Laag geschoold"
155 2 = "Midden geschoold"
156 3 = "Hoog geschoold"
157 ;
NOTE: Format EDULVLARECFMT has been output.
158 run;

NOTE: PROCEDURE FORMAT used (Total process time):
real time 0.04 seconds
cpu time 0.02 seconds


159
160
161
162 data ess2;
163 set ess2;
164
165 select (EDULVLA);

, 166 when (1)EDULVLARec = 1;
167 when (2,3,4)EDULVLARec = 2;
168 when (5)EDULVLARec = 3;
169 otherwiseEDULVLARec = .;
170 end;
171
172 label EDULVLARec = "Highest level of education - Recoded";
173 format EDULVLARec EDULVLARecfmt.;
174
175 run;

NOTE: Format EDLVAGB was not found or could not be loaded.
NOTE: There were 47537 observations read from the data set WORK.ESS2.
NOTE: The data set WORK.ESS2 has 47537 observations and 609 variables.
NOTE: DATA statement used (Total process time):
real time 3.01 seconds
cpu time 2.49 seconds


176
177
178
179 proc freq data = ess2;
180 tables EDULVLARec;
181 run;

NOTE: There were 47537 observations read from the data set WORK.ESS2.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.12 seconds
cpu time 0.11 seconds


182
183
184
185 *Landen numeriek maken.
186 ***********************;
187
188
189 proc sort data = ess2;
190 by CNTRY;
191 run;

NOTE: There were 47537 observations read from the data set WORK.ESS2.
NOTE: The data set WORK.ESS2 has 47537 observations and 609 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 2.40 seconds
cpu time 2.33 seconds


192
193 data ess2;
194 set ess2;
195 by CNTRY;
196 if first.CNTRY then CNTRYNUM + 1;
197 label CNTRYNUM = "Numerieke landvariabele";
198 run;

NOTE: Format EDLVAGB was not found or could not be loaded.
NOTE: There were 47537 observations read from the data set WORK.ESS2.
NOTE: The data set WORK.ESS2 has 47537 observations and 610 variables.
NOTE: DATA statement used (Total process time):
real time 3.34 seconds
cpu time 2.39 seconds


199
200
201 proc freq data = ess2;
202 tables CNTRY CNTRYNUM;
203 run;

NOTE: There were 47537 observations read from the data set WORK.ESS2.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.39 seconds
cpu time 0.37 seconds


204
205
206

Voordelen van het kopen van samenvattingen bij Stuvia op een rij:

√  	Verzekerd van kwaliteit door reviews

√ Verzekerd van kwaliteit door reviews

Stuvia-klanten hebben meer dan 700.000 samenvattingen beoordeeld. Zo weet je zeker dat je de beste documenten koopt!

Snel en makkelijk kopen

Snel en makkelijk kopen

Je betaalt supersnel en eenmalig met iDeal, Bancontact of creditcard voor de samenvatting. Zonder lidmaatschap.

Focus op de essentie

Focus op de essentie

Samenvattingen worden geschreven voor en door anderen. Daarom zijn de samenvattingen altijd betrouwbaar en actueel. Zo kom je snel tot de kern!

Veelgestelde vragen

Wat krijg ik als ik dit document koop?

Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.

Tevredenheidsgarantie: hoe werkt dat?

Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.

Van wie koop ik deze samenvatting?

Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper clairevanroey. Stuvia faciliteert de betaling aan de verkoper.

Zit ik meteen vast aan een abonnement?

Nee, je koopt alleen deze samenvatting voor €6,49. Je zit daarna nergens aan vast.

Is Stuvia te vertrouwen?

4,6 sterren op Google & Trustpilot (+1000 reviews)

Afgelopen 30 dagen zijn er 56326 samenvattingen verkocht

Opgericht in 2010, al 14 jaar dé plek om samenvattingen te kopen

Start met verkopen
€6,49
  • (0)
In winkelwagen
Toegevoegd