HETCOR gives an error even when other procedures work.

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

HETCOR gives an error even when other procedures work.

Art Kendall
In a post to this group I assembled several of the different ways that
one can find correlations in the guise of phi.

I used the GUI to generate all of the syntax but HETCOR gave this error.

> SPSSINC HETCOR x1 x2 x3 x4 x5
>   /OPTIONS ESTIMATOR=TWOSTEP STDERR=TRUE
>   MISSING=PAIRWISE N=TRUE TYPE=TRUE
>   /SAVE.
>
> >Warning # 6894.  Command name: BEGIN PROGRAM
> >The external program exit unexpectedly and lost its content, a new
> exteranl
> >program will startup to execute the rest of job.
> SPSSINC HETCOR command failed

> Warnings
> <type 'exceptions.Exception'>
>
>
>
here is the syntax.
*PHI is PHI is ordinary r.
new file.
input program.
    vector x (5,f1).
    loop id = 1 to 25.
       loop #p = 1 to 10.
          compute x(#p) = rv.bernoulli(.3).
       end loop.
       end case.
    end loop.
    end file.
end input program.
CORRELATIONS
   /VARIABLES=x1 x2 x3 x4 x5
   /PRINT=TWOTAIL NOSIG
   /MISSING=PAIRWISE.
NONPAR CORR
   /VARIABLES=x1 x2 x3 x4 x5
   /PRINT=KENDALL TWOTAIL NOSIG
   /MISSING=PAIRWISE.
PROXIMITIES x1 x2 x3 x4 x5
   /VIEW=VARIABLE
   /MEASURE=PHI (1,0).
crosstabs tables= x1 by x2 to x5
   /format= NOTABLES
   /statistics = phi.
SPSSINC HETCOR x1 x2 x3 x4 x5
   /OPTIONS ESTIMATOR=TWOSTEP STDERR=TRUE
   MISSING=PAIRWISE N=TRUE TYPE=TRUE
   /SAVE.




--
Art Kendall
Social Research Consultants

=====================
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
Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: HETCOR gives an error even when other procedures work.

Jon K Peck
Art,

When I run HETCOR in V20 on your example, the R hetcor package fails due to data conditions.  My experience with that package is that it has trouble finding good starting values for the iterative calculation when the data are too far from having a normal distribution.  I get this error message (SPSS text replacing the incomprehensible original R error message):

SPSS HETCOR command was unable to compute the correlations due to data conditions.
This is usually due to some variables being too far from a bivariate normal distribution.
 
Interestingly, trying the same problem with SPSS Statistics version next, which uses a newer version of R, I don't get that error.
Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        Art Kendall <[hidden email]>
To:        [hidden email]
Date:        06/11/2012 06:41 AM
Subject:        [SPSSX-L] HETCOR gives an error even when other procedures work.
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




In a post to this group I assembled several of the different ways that
one can find correlations in the guise of phi.

I used the GUI to generate all of the syntax but HETCOR gave this error.
> SPSSINC HETCOR x1 x2 x3 x4 x5
>   /OPTIONS ESTIMATOR=TWOSTEP STDERR=TRUE
>   MISSING=PAIRWISE N=TRUE TYPE=TRUE
>   /SAVE.
>
> >Warning # 6894.  Command name: BEGIN PROGRAM
> >The external program exit unexpectedly and lost its content, a new
> exteranl
> >program will startup to execute the rest of job.
> SPSSINC HETCOR command failed

> Warnings
> <type 'exceptions.Exception'>
>
>
>
here is the syntax.
*PHI is PHI is ordinary r.
new file.
input program.
   vector x (5,f1).
   loop id = 1 to 25.
      loop #p = 1 to 10.
         compute x(#p) = rv.bernoulli(.3).
      end loop.
      end case.
   end loop.
   end file.
end input program.
CORRELATIONS
  /VARIABLES=x1 x2 x3 x4 x5
  /PRINT=TWOTAIL NOSIG
  /MISSING=PAIRWISE.
NONPAR CORR
  /VARIABLES=x1 x2 x3 x4 x5
  /PRINT=KENDALL TWOTAIL NOSIG
  /MISSING=PAIRWISE.
PROXIMITIES x1 x2 x3 x4 x5
  /VIEW=VARIABLE
  /MEASURE=PHI (1,0).
crosstabs tables= x1 by x2 to x5
  /format= NOTABLES
  /statistics = phi.
SPSSINC HETCOR x1 x2 x3 x4 x5
  /OPTIONS ESTIMATOR=TWOSTEP STDERR=TRUE
  MISSING=PAIRWISE N=TRUE TYPE=TRUE
  /SAVE.




--
Art Kendall
Social Research Consultants

=====================
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: HETCOR gives an error even when other procedures work.

Art Kendall
I did not change my spss.pth and spssclient.pth to call R from version 21 so I did not make any further attempt in 21.
Art Kendall
Social Research Consultants

On 6/11/2012 9:44 AM, Jon K Peck wrote:
Art,

When I run HETCOR in V20 on your example, the R hetcor package fails due to data conditions.  My experience with that package is that it has trouble finding good starting values for the iterative calculation when the data are too far from having a normal distribution.  I get this error message (SPSS text replacing the incomprehensible original R error message):

SPSS HETCOR command was unable to compute the correlations due to data conditions.
This is usually due to some variables being too far from a bivariate normal distribution.
 
Interestingly, trying the same problem with SPSS Statistics version next, which uses a newer version of R, I don't get that error.
Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
new phone: 720-342-5621




From:        Art Kendall [hidden email]
To:        [hidden email]
Date:        06/11/2012 06:41 AM
Subject:        [SPSSX-L] HETCOR gives an error even when other procedures work.
Sent by:        "SPSSX(r) Discussion" [hidden email]




In a post to this group I assembled several of the different ways that
one can find correlations in the guise of phi.

I used the GUI to generate all of the syntax but HETCOR gave this error.
> SPSSINC HETCOR x1 x2 x3 x4 x5
>   /OPTIONS ESTIMATOR=TWOSTEP STDERR=TRUE
>   MISSING=PAIRWISE N=TRUE TYPE=TRUE
>   /SAVE.
>
> >Warning # 6894.  Command name: BEGIN PROGRAM
> >The external program exit unexpectedly and lost its content, a new
> exteranl
> >program will startup to execute the rest of job.
> SPSSINC HETCOR command failed

> Warnings
> <type 'exceptions.Exception'>
>
>
>
here is the syntax.
*PHI is PHI is ordinary r.
new file.
input program.
   vector x (5,f1).
   loop id = 1 to 25.
      loop #p = 1 to 10.
         compute x(#p) = rv.bernoulli(.3).
      end loop.
      end case.
   end loop.
   end file.
end input program.
CORRELATIONS
  /VARIABLES=x1 x2 x3 x4 x5
  /PRINT=TWOTAIL NOSIG
  /MISSING=PAIRWISE.
NONPAR CORR
  /VARIABLES=x1 x2 x3 x4 x5
  /PRINT=KENDALL TWOTAIL NOSIG
  /MISSING=PAIRWISE.
PROXIMITIES x1 x2 x3 x4 x5
  /VIEW=VARIABLE
  /MEASURE=PHI (1,0).
crosstabs tables= x1 by x2 to x5
  /format= NOTABLES
  /statistics = phi.
SPSSINC HETCOR x1 x2 x3 x4 x5
  /OPTIONS ESTIMATOR=TWOSTEP STDERR=TRUE
  MISSING=PAIRWISE N=TRUE TYPE=TRUE
  /SAVE.




--
Art Kendall
Social Research Consultants

=====================
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


===================== 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
Art Kendall
Social Research Consultants