Partial Corr Syntax Assistance

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Partial Corr Syntax Assistance

Cathy Mazzotta
 
        Hi everyone

        I received feedback that it would be helpful to include my sytax and
error messages.  I am trying to compose sytax for multiple regression,
partial correlation using a correlation matrix only for data.

        Any assistance would be great appreciated.  

        Thank you Cathy Mazzotta UB doctoral student UB SW

        SYntax

        matrix data variables= x1 x2 x3 x4 x5/
  contents= n mean stdev corr.
 begin data
 500 500 500 500 500
 0 0 0 0 0
 1 1 1 1 1
 1.00
   .35  1.00
   .40   .15  1.00    
   .52   .37    .31  1.00
   .48   .40    .50    .46 1.00
 end data.
 execute.
 regression matrix=in (*)/var=x1 to x5/stat=all/
  dep=x1/enter x2/ enter x3/.
  PARTIAL CORR
   GET matrix=in (*)/.
  VARIABLES= Corr x1 with x3 by x2/stat=all.
 regression matrix=in (*)/var=x1 to x5/stat=all/
  dep=x1/enter x2 x3 /enter x4/.
  PARTIAL  CORR
   GET matrix=in (*)/.
  VARIABLES= Corr x1 with x4 by x2 x3/stat=all.

        ERROR MESSAGES

        PARTIAL

        GET matrix=in (*)/.

        >Error # 1. Command name: PARTIAL

        >The first word in the line is not recognized as an SPSS command.

        >This command not executed.

        VARIABLES= CORR x1 with x3 by x2/stat=all.

        >Error # 1. Command name: VARIABLES

        >The first word in the line is not recognized as an SPSS command.

        >This command not executed.

        regression matrix=in (*)/var=x1 to x5/stat=all/

        dep=x1/enter x2 x3 /enter x4/.  BODY { font-family:Arial, Helvetica,
sans-serif;font-size:12px; }
 

====================To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Partial Corr Syntax Assistance

Maguin, Eugene
Cathy,

There are several things wrong, I'm pretty sure. You say you are working in
syntax so one thing is that the command must start in column 1. Although I'm
not sure, I think your statement starts in column 3 (or maybe 2). Second,
the period following the 'get matrix' subcommand should not be there. You
have this:

  PARTIAL  CORR
   GET matrix=in (*)/.
  VARIABLES= Corr x1 with x4 by x2 x3/stat=all.

I think it should be this:

PARTIAL CORR matrix=in (*)/VARIABLES= x1 with x4 by x2 x3/stat=all.

I don't work with matrix input so I may be wrong about some elements. I also
think you can simplify your syntax.

PARTIAL CORR x1 with x4 by x2 x3/stat=all/matrix=in (*).

Also, you specify statistics=all but you also have that 'corr' keyword in
there; so, I'm not sure of whether you want just the corrs or descriptives,
badcorrs and corrs. You might as well get familiar with the syntax reference
manual that is accessible from the help menu.

Gene Maguin

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD