Using a macro in SPSS to run the AREG syntax command on multiple variables (subjects) at one time?

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

gran917
Posts: 1
Joined: Wed Feb 17, 2016 7:36 pm

Using a macro in SPSS to run the AREG syntax command on multiple variables (subjects) at one time?

Postby gran917 » Wed Feb 17, 2016 7:38 pm

Hello!

I am attempting to use the AREG command in SPSS to run a Cochrane-Orcutt transformation on multiple subjects at one time. My data file has about 80 participants. My syntax currently looks like this:

/AREG Subject1 with Time
/Method=CO
/RHO=.9.

The output of this syntax gives me my desired, new, "Fit" variable. My problem arises when I try to run:

/AREG Subject2 with Time
/Method=CO
/RHO=.9.

Running this second set of syntax removes the first "Fit" variable for Subject 1, and replaces it with the new "Fit" variable for Subject 2. Is there a way to use macros in SPSS to run Subjects1-80 at one time and have a unique "Fit" variable for each subject? I am trying to avoid having to copy and paste each "Fit" variable for all 80 participants (I have about 100 data sets total, each with ~80 participants, so this would take days).

Thank you very much for your help and time! :)

Who is online

Users browsing this forum: No registered users and 1 guest

cron