100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Examenopdracht $7.02
Add to cart

Exam (elaborations)

Examenopdracht

 50 views  0 purchase
  • Course
  • Institution

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

Preview 3 out of 16  pages

  • November 26, 2019
  • 16
  • 2018/2019
  • Exam (elaborations)
  • Answers
avatar-seller
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller clairevanroey. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $7.02. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

56326 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$7.02
  • (0)
Add to cart
Added