Hi,
I want to conduct One-way ANOVA's of a few DV's with a very large number of IV's (grouping factors). Is it possible to write syntax that creates a routine that will repeat the instructions for each of the IV's? I have searched this site and others for macros that might do this, but to no avail. TIA Glenys Lafrance |
Hi Glenys
GL> I want to conduct One-way ANOVA's of a few DV's with a very large number of GL> IV's (grouping factors). GL> Is it possible to write syntax that creates a routine that will repeat the GL> instructions for each of the IV's? I have searched this site and others for GL> macros that might do this, but to no avail. Is this what you want? (make sure that "C:\Temp\" folder exists). MACRO definition. DEFINE ALLANOVA (y=!ENCLOSED("(",")")/ x=!ENCLOSED("(",")")). DO IF $CASENUM=1. !DO !i !IN (!y). !DO !j !IN (!x). WRITE OUTFILE "C:\Temp\AllANOVAS.sps" /"ONEWAY" /!QUOTE(!i) " BY " !QUOTE(!j) /" /STATISTICS DESCRIPTIVES HOMOGENEITY" /" /POSTHOC = SNK TUKEY ALPHA(.05).". * I have selected some descriptives&statistics, * modify them if needed, but be careful with the / and " . !DOEND. !DOEND. END IF. EXECUTE. INCLUDE FILE="C:\Temp\AllANOVAS.sps". !ENDDEFINE. * MACRO call *. ALLANOVA y=(list of depvar) x=(list of IV). -- Regards, Dr. Marta García-Granero,PhD mailto:[hidden email] Statistician --- "It is unwise to use a statistical procedure whose use one does not understand. SPSS syntax guide cannot supply this knowledge, and it is certainly no substitute for the basic understanding of statistics and statistical thinking that is essential for the wise choice of methods and the correct interpretation of their results". (Adapted from WinPepi manual - I'm sure Joe Abrahmson will not mind) |
In reply to this post by Glenys Lafrance
Hi Glenis
Sorry... The macro should have been simpler (no need to create a syntax file to be included later): * MACRO definition. DEFINE ALLANOVA (y=!ENCLOSED("(",")")/ x=!ENCLOSED("(",")")). !DO !dv !IN (!y). !DO !iv !IN (!x). ONEWAY !dv BY !iv /STATISTICS DESCRIPTIVES HOMOGENEITY /POSTHOC = SNK TUKEY ALPHA(.05). !DOEND. !DOEND. EXECUTE. !ENDDEFINE. Same MACRO call as before. This makes easier to modify it to add the options you need (not having to mess around with items inside or outside quotes). -- Regards, Dr. Marta García-Granero,PhD mailto:[hidden email] Statistician --- "It is unwise to use a statistical procedure whose use one does not understand. SPSS syntax guide cannot supply this knowledge, and it is certainly no substitute for the basic understanding of statistics and statistical thinking that is essential for the wise choice of methods and the correct interpretation of their results". (Adapted from WinPepi manual - I'm sure Joe Abrahmson will not mind) |
Free forum by Nabble | Edit this page |