Syntax Comments in SPSS

There two way to write comments in SPSS: the non executed line and the in-line comment.

The first, the non executed line, look like this:

* reliability of measures.
RELIABILITY
/VARIABLES=it1 it2 it3
/SCALE('ALL VARIABLES') ALL
/MODEL=ALPHA
/STATISTICS=DESCRIPTIVE SCALE
/SUMMARY=TOTAL.

This is ok for making titles before sectionsn out ot a syntax; or to cancel out commands. like in the following example.

if(it1 = 1) dummy = 1 .
if(it1 = 2) dummy = 0 .
*if(it1 = 3) dummy = 1 .
execute .

On the other hand, the inline comments, serve the purpose of including a comment within a line of commands, like this.

if(it1 = 1) dummy = 1 .
if(it1 = 2) dummy = 0 .
if(it1 = 3) dummy = 1 . /* discuss this option in the research meeting */ 
execute .

 

via

http://www.dummies.com/how-to/content/spss-syntax-language-comments.html

1 comments:

Azharuddin said...

Thanks for the information. This information is very helpful for SPSS Training Learners.

Post a Comment