1,722
Views
2
CrossRef citations to date
0
Altmetric
Articles

Do Students Learn More from Erroneous Code? Exploring Student Performance and Satisfaction in an Error-Free Versus an Error-full SAS® Programming Environment

&
Pages 228-240 | Published online: 21 Sep 2021

Figures & data

Fig. 1 SAS program with incorrect column numbers. This is the SAS Enhanced Editor window containing an example of a DATA step that compiled and executed without generating any error messages in the log but did not yield the desired output SAS dataset.

Fig. 1 SAS program with incorrect column numbers. This is the SAS Enhanced Editor window containing an example of a DATA step that compiled and executed without generating any error messages in the log but did not yield the desired output SAS dataset.

Fig. 2 SAS Log window. This is the SAS log, which generates messages about the execution of the program. This log indicates the program in executed successfully and created a new SAS dataset containing 6 observations and 9 variables.

Fig. 2 SAS Log window. This is the SAS log, which generates messages about the execution of the program. This log indicates the program in Figure 1 executed successfully and created a new SAS dataset containing 6 observations and 9 variables.

Fig. 3 VIEWTABLE window showing the contents of hospital SAS dataset. These are the values of the variables in the hospital SAS dataset. Notice that some values of all variables (except ID) are incorrect since the wrong columns were specified in the INPUT statement.

Fig. 3 VIEWTABLE window showing the contents of hospital SAS dataset. These are the values of the variables in the hospital SAS dataset. Notice that some values of all variables (except ID) are incorrect since the wrong columns were specified in the INPUT statement.

Fig. 4 Error-free lecture SAS program. This is the SAS Enhanced Editor window containing one of the DATA steps used during the error-free lecture. Only a subset of the data lines is shown to conserve space.

Fig. 4 Error-free lecture SAS program. This is the SAS Enhanced Editor window containing one of the DATA steps used during the error-free lecture. Only a subset of the data lines is shown to conserve space.

Fig. 5 Error-free lecture SAS log. This is the SAS log, which generates messages about the execution of the program. This log indicates the program in executed successfully and created a new SAS dataset containing 48 observations and 10 variables.

Fig. 5 Error-free lecture SAS log. This is the SAS log, which generates messages about the execution of the program. This log indicates the program in Figure 4 executed successfully and created a new SAS dataset containing 48 observations and 10 variables.

Fig. 6 Error-free assignment solution. This is the SAS Enhanced Editor window containing a solution to the error-free assignment. Only a subset of the data lines is shown to conserve space.

Fig. 6 Error-free assignment solution. This is the SAS Enhanced Editor window containing a solution to the error-free assignment. Only a subset of the data lines is shown to conserve space.

Fig. 7 Error-free assignment SAS log. This is the SAS log, which generates messages about the execution of the program. This log indicates the program in executed successfully and created a new SAS dataset containing 74 observations and 15 variables.

Fig. 7 Error-free assignment SAS log. This is the SAS log, which generates messages about the execution of the program. This log indicates the program in Figure 6 executed successfully and created a new SAS dataset containing 74 observations and 15 variables.

Fig. 8 Error-full lecture SAS program. This is the SAS Enhanced Editor window containing one of the DATA steps used during the error-full lecture. Only a subset of the data lines is shown to conserve space.

Fig. 8 Error-full lecture SAS program. This is the SAS Enhanced Editor window containing one of the DATA steps used during the error-full lecture. Only a subset of the data lines is shown to conserve space.

Fig. 9 Error-full lecture SAS log. This is the SAS log, which generates messages about the execution of the program. This log indicates the program in executed successfully and created a new SAS dataset containing 48 observations and 10 variables.

Fig. 9 Error-full lecture SAS log. This is the SAS log, which generates messages about the execution of the program. This log indicates the program in Figure 8 executed successfully and created a new SAS dataset containing 48 observations and 10 variables.

Fig. 10 Error-full lecture SAS log with error (1). This is the SAS log, which generates messages about the execution of the program. This log indicates the program did not execute successfully. While the new SAS dataset “clinic” was created with 48 observations and 10 variables, the last row of data was not processed as part of the DATA step. Instead, SAS encountered an invalid statement and execution stopped.

Fig. 10 Error-full lecture SAS log with error (1). This is the SAS log, which generates messages about the execution of the program. This log indicates the program did not execute successfully. While the new SAS dataset “clinic” was created with 48 observations and 10 variables, the last row of data was not processed as part of the DATA step. Instead, SAS encountered an invalid statement and execution stopped.

Fig. 11 Error-full lecture SAS log with error (2). This is the SAS log, which generates messages about the execution of the program. This log indicates the program did not execute successfully. The DATA step created a new SAS dataset containing 0 observations and 10 variables, which was not the desired output dataset. Execution stopped due to an error in line 8.

Fig. 11 Error-full lecture SAS log with error (2). This is the SAS log, which generates messages about the execution of the program. This log indicates the program did not execute successfully. The DATA step created a new SAS dataset containing 0 observations and 10 variables, which was not the desired output dataset. Execution stopped due to an error in line 8.

Fig. 12 Error-full lecture SAS log with error (3). This is the SAS log, which generates messages about the execution of the program. This log indicates the program executed successfully, but it also provides a note hinting there may be an issue. While the new SAS dataset “clinic” was created with 48 observations and 10 variables, the “date9” format was not applied to the variables “dob” and “dov”.

Fig. 12 Error-full lecture SAS log with error (3). This is the SAS log, which generates messages about the execution of the program. This log indicates the program executed successfully, but it also provides a note hinting there may be an issue. While the new SAS dataset “clinic” was created with 48 observations and 10 variables, the “date9” format was not applied to the variables “dob” and “dov”.

Fig. 13 Error-full lecture SAS log with error (4). This is the SAS log, which generates messages about the execution of the program. This log indicates the program executed and created a new SAS dataset containing 48 observations and 10 variables. However, the values for the numeric variable “age” were calculated incorrectly because of missing parentheses.

Fig. 13 Error-full lecture SAS log with error (4). This is the SAS log, which generates messages about the execution of the program. This log indicates the program executed and created a new SAS dataset containing 48 observations and 10 variables. However, the values for the numeric variable “age” were calculated incorrectly because of missing parentheses.

Fig. 14 Subset of SAS dataset “clinic.” These are the first five observations of the SAS dataset “clinic.” In examining the data closely, it is obvious that the values for the variable “age” (in years) were calculated incorrectly.

Fig. 14 Subset of SAS dataset “clinic.” These are the first five observations of the SAS dataset “clinic.” In examining the data closely, it is obvious that the values for the variable “age” (in years) were calculated incorrectly.

Fig. 15 Error-full assignment solution. This is the SAS Enhanced Editor window containing a solution to the error-full assignment. Only a subset of the data lines is shown to conserve space.

Fig. 15 Error-full assignment solution. This is the SAS Enhanced Editor window containing a solution to the error-full assignment. Only a subset of the data lines is shown to conserve space.

Fig. 16 Error-full assignment SAS log. This is the SAS log, which generates messages about the execution of the program. This log indicates the program in executed successfully and created a new SAS dataset containing 54 observations and 14 variables.

Fig. 16 Error-full assignment SAS log. This is the SAS log, which generates messages about the execution of the program. This log indicates the program in Figure 15 executed successfully and created a new SAS dataset containing 54 observations and 14 variables.
Supplemental material

Supplemental Material

Download Zip (417.1 KB)

Data Sharing

In the IRB application, we declared that all data would be aggregated/summarized in all publications, and no individual-level results would be communicated to protect the students’ privacy and confidentiality.