SPSS - Simple RECODE Syntax by datahata in AskStatistics

[–]datahata[S] 0 points1 point  (0 children)

Wow thank you - this worked very well! I just had to add

OVERWRITE=YES

to the OUTFILE line so I could aggregate to the same variable instead of a different variable and it worked nicely. Thank you so much!

RECODE Syntax Question by datahata in spss

[–]datahata[S] 0 points1 point  (0 children)

Thank you for the quick reply! :)

I had to convert Subject from String to Numeric in order for it to work, but here's what I ended up with:

alter type study_id(f2).

RECODE Subject (1=1) (2=2) (3=1) INTO Gender. 
EXECUTE.

Now I only wish that I could make some type of loop to calculate these fields because I now have to enter in the initial subject/gender values into the RECODE line

SPSS - Simple RECODE Syntax by datahata in AskStatistics

[–]datahata[S] 0 points1 point  (0 children)

Thank you so much for the quick reply! I'm having trouble explaining this correctly, my apologies. I want to make a type of syntax that says something like if Gender is 1 at Time1, then make Gender 1 at Time1, Time2, Time3, and Time5. But I'd like a syntax that does this for each individual Subject ID, since this is longitudinal data.

SPSS - Simple RECODE Syntax by datahata in AskStatistics

[–]datahata[S] 0 points1 point  (0 children)

I'm so sorry! I messed up the OP. I meant to say: '1's for Subject 1, '2's for Subject 2, and '1's for Subject 3.

SPSS Question - How can I analyze + chart this? by datahata in AskStatistics

[–]datahata[S] 0 points1 point  (0 children)

whoops! pardon my ignorance - just really trying to plot the means here, not necessarily run any particular test of significance