proc print data = temp (firstobs = 1 obs = 10);
var id Score_M_2009 Score_M_2008 score_m_2007;
title 'original data file';
* Select the variables to be used in the school level file;
DATA temp_mc5 (keep=mathcohort Samp_Check_c5_09
id School_SD_2009 math_avail
Pl2b_Math_08 Pl2b_Math_09 Pl2b_Math_07
Female_09_N Male_09_N SWD_09
Score_M_2008 Score_M_2009 Score_M_2007
MathSimpleGain09
mastid MathSimpleGain0908 MathSimpleGain0907 MathSimpleGain0807
FRL_09 LEPD_09 Black_09 AmInd_09 Asian_09 Hisp_09 White_09 NDC_09
);
MathSimpleGain09=Score_M_2009-Score_M_2008;
MathSimpleGain0908=Score_M_2009-Score_M_2008;
MathSimpleGain0907=Score_M_2009-Score_M_2007;
MathSimpleGain0807=Score_M_2008-Score_M_2007;
mastid=id;
SET temp;
run;
*above code gives us missing data statement;
*look at a small number of obs;
*calculatied and new id variables for first row of data appear in second row of data;
proc print data = temp_mc5 (firstobs = 1 obs = 10);
var id mastid mathsimplegain0908 mathsimplegain0907 mathsimplegain0807
Score_M_2009 Score_M_2008 score_m_2007;
title 'first 10 cases with combined code';
run;
*separate out existing variables from
created variables in keep statement;
DATA temp_mc5_3 (keep=mathcohort Samp_Check_c5_09
id School_SD_2009 math_avail
Pl2b_Math_08 Pl2b_Math_09 Pl2b_Math_07
Female_09_N Male_09_N SWD_09
Score_M_2008 Score_M_2009 Score_M_2007
FRL_09 LEPD_09 Black_09 AmInd_09 Asian_09 Hisp_09 White_09 NDC_09
);
SET temp;
run;
proc print data = temp_mc5_3 (firstobs = 1 obs = 10);
var id Score_M_2009 Score_M_2008 score_m_2007;
title 'keep statement separated';
run;
data temp_mc5_4;
set temp_mc5_3;
MathSimpleGain09=Score_M_2009-Score_M_2008;
MathSimpleGain0908=Score_M_2009-Score_M_2008;
MathSimpleGain0907=Score_M_2009-Score_M_2007;
MathSimpleGain0807=Score_M_2008-Score_M_2007;
mastid=id;
run;
proc print data = temp_mc5_4 (firstobs = 1 obs = 10);
var id mastid mathsimplegain0908 mathsimplegain0907 mathsimplegain0807
Score_M_2009 Score_M_2008 score_m_2007;
title 'new variables created in separate program';
run;
320
321
322 proc print data = temp (firstobs = 1 obs = 10);
323 var id Score_M_2009 Score_M_2008 score_m_2007;
324 title 'original data file';
325
326
327
328 * Select the variables to be used in the school level file;
NOTE: There were 10 observations read from the data set WORK.TEMP.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
329 DATA temp_mc5 (keep=mathcohort Samp_Check_c5_09
330 id School_SD_2009 math_avail
331 Pl2b_Math_08 Pl2b_Math_09 Pl2b_Math_07
332 Female_09_N Male_09_N SWD_09
333 Score_M_2008 Score_M_2009 Score_M_2007
334 MathSimpleGain09
335 mastid MathSimpleGain0908 MathSimpleGain0907
335! MathSimpleGain0807
336 FRL_09 LEPD_09 Black_09 AmInd_09 Asian_09 Hisp_09
336! White_09 NDC_09
337 );
338 MathSimpleGain09=Score_M_2009-Score_M_2008;
339 MathSimpleGain0908=Score_M_2009-Score_M_2008;
340 MathSimpleGain0907=Score_M_2009-Score_M_2007;
341 MathSimpleGain0807=Score_M_2008-Score_M_2007;
342 mastid=id;
343 SET temp;
344 run;
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).
1 at 338:30 1 at 339:32 1 at 340:32 1 at 341:32
NOTE: There were 69949 observations read from the data set WORK.TEMP.
NOTE: The data set WORK.TEMP_MC5 has 69949 observations and 27 variables.
NOTE: DATA statement used (Total process time):
real time 0.09 seconds
cpu time 0.07 seconds
345 *above code gives us missing data statement;
346
347 *look at a small number of obs;
348 *calculatied and new id variables for first row of data appear in second
348! row of data;
349 proc print data = temp_mc5 (firstobs = 1 obs = 10);
350 var id mastid mathsimplegain0908 mathsimplegain0907 mathsimplegain0807
351 Score_M_2009 Score_M_2008 score_m_2007;
352 title 'first 10 cases with combined code';
353 run;
NOTE: There were 10 observations read from the data set WORK.TEMP_MC5.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
354
355
356 *separate out existing variables from
357 created variables in keep statement;
358
359 DATA temp_mc5_3 (keep=mathcohort Samp_Check_c5_09
360 id School_SD_2009 math_avail
361 Pl2b_Math_08 Pl2b_Math_09 Pl2b_Math_07
362 Female_09_N Male_09_N SWD_09
363 Score_M_2008 Score_M_2009 Score_M_2007
364
365
366 FRL_09 LEPD_09 Black_09 AmInd_09 Asian_09 Hisp_09
366! White_09 NDC_09
367 );
368
369 SET temp;
370 run;
NOTE: There were 69949 observations read from the data set WORK.TEMP.
NOTE: The data set WORK.TEMP_MC5_3 has 69949 observations and 22 variables.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.07 seconds
371
372 proc print data = temp_mc5_3 (firstobs = 1 obs = 10);
373 var id Score_M_2009 Score_M_2008 score_m_2007;
374 title 'keep statement separated';
375 run;
NOTE: There were 10 observations read from the data set WORK.TEMP_MC5_3.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
376
377 data temp_mc5_4;
378 set temp_mc5_3;
379 MathSimpleGain09=Score_M_2009-Score_M_2008;
380 MathSimpleGain0908=Score_M_2009-Score_M_2008;
381 MathSimpleGain0907=Score_M_2009-Score_M_2007;
382 MathSimpleGain0807=Score_M_2008-Score_M_2007;
383 mastid=id;
384 run;
NOTE: There were 69949 observations read from the data set WORK.TEMP_MC5_3.
NOTE: The data set WORK.TEMP_MC5_4 has 69949 observations and 27 variables.
NOTE: DATA statement used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
385
386 proc print data = temp_mc5_4 (firstobs = 1 obs = 10);
387 var id mastid mathsimplegain0908 mathsimplegain0907 mathsimplegain0807
388 Score_M_2009 Score_M_2008 score_m_2007;
389 title 'new variables created in separate program';
390 run;
NOTE: There were 10 observations read from the data set WORK.TEMP_MC5_4.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
original data file 14
18:01 Saturday, August 20, 2016
Obs ID Score_M_2009 Score_M_2008 Score_M_2007
1 79634824 594 502 479
2 74054401 457 443 415
3 74053183 428 480 430
4 69954901 503 512 471
5 65549092 454 452 399
6 65533144 513 480 439
7 65400466 484 492 439
8 65400445 517 462 459
9 65400424 437 398 418
10 65392366 496 469 421
first 10 cases with combined code 15
18:01 Saturday, August 20, 2016
Math Math Math
Simple Simple Simple
Obs id mastid Gain0908 Gain0907 Gain0807
1 79634824 . . . .
2 74054401 79634824 92 115 23
3 74053183 74054401 14 42 28
4 69954901 74053183 -52 -2 50
5 65549092 69954901 -9 32 41
6 65533144 65549092 2 55 53
7 65400466 65533144 33 74 41
8 65400445 65400466 -8 45 53
9 65400424 65400445 55 58 3
10 65392366 65400424 39 19 -20
Obs Score_M_2009 Score_M_2008 Score_M_2007
1 594 502 479
2 457 443 415
3 428 480 430
4 503 512 471
5 454 452 399
6 513 480 439
7 484 492 439
8 517 462 459
9 437 398 418
10 496 469 421
keep statement separated 16
18:01 Saturday, August 20, 2016
Obs ID Score_M_2009 Score_M_2008 Score_M_2007
1 79634824 594 502 479
2 74054401 457 443 415
3 74053183 428 480 430
4 69954901 503 512 471
5 65549092 454 452 399
6 65533144 513 480 439
7 65400466 484 492 439
8 65400445 517 462 459
9 65400424 437 398 418
10 65392366 496 469 421
new variables created in separate program 17
18:01 Saturday, August 20, 2016
Math Math Math
Simple Simple Simple
Obs ID mastid Gain0908 Gain0907 Gain0807
1 79634824 79634824 92 115 23
2 74054401 74054401 14 42 28
3 74053183 74053183 -52 -2 50
4 69954901 69954901 -9 32 41
5 65549092 65549092 2 55 53
6 65533144 65533144 33 74 41
7 65400466 65400466 -8 45 53
8 65400445 65400445 55 58 3
9 65400424 65400424 39 19 -20
10 65392366 65392366 27 75 48
Obs Score_M_2009 Score_M_2008 Score_M_2007
1 594 502 479
2 457 443 415
3 428 480 430
4 503 512 471
5 454 452 399
6 513 480 439
7 484 492 439
8 517 462 459
9 437 398 418
10 496 469 421