SPSS Statistics

 View Only
Expand all | Collapse all

SPSS 28.0.1.1 and R Extension STATS ZEROINFL

  • 1.  SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 09:26 AM
    I'm receiving an error code #6894 every time I click Analyze<Generalized Linear Models<Zero Inflated Count Models. I've searched everywhere for the solution to this but I can't find anything related to this particular issue. I am using Windows 11, which some on Reddit have said might be the issue. This is the output:

    I started a new syntax inputting:

    BEGIN PROGRAM R.
    print(sessionInfo())
    end program.  

    and this is was the output: 
    I would be grateful for any help here. I am at a total loss for what to do about this. Thank you!! 


    ------------------------------
    Ian Hobbs
    ------------------------------


  • 2.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 11:19 AM
    Hi. I have tried version 29 and version 28.0.1 on a Win11 machine, and ZEROINFL works for me.

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 3.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 11:43 AM
    I have version 29 as well and still get this error. Any ideas what I can do to fix this? Thank you.

    ------------------------------
    Ian Hobbs
    ------------------------------



  • 4.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 12:31 PM
    At least we know it isn't a Win11 thing per se, nor is it a general problem with installation for all users.

    We have to figure out what's different with this install. Copy and paste the following to a syntax window, run it, and let us see what you get:

    SHOW EXTPATHS PLUGINS.

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 5.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 02:10 PM
    Apologies for the delay and thank you for the quick follow-up responses. OK, here's the output from the syntax window:



    ------------------------------
    Ian Hobbs
    ------------------------------



  • 6.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 02:17 PM
    Can you tell me where Z:\ is? It is a remote drive?

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 7.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 02:59 PM
    Yes! It's a backup drive I installed because my C drive is puny at only 250G (yeah, I'm old school like that). Is that causing the issue?

    ------------------------------
    Ian Hobbs
    ------------------------------



  • 8.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 03:38 PM
    Yes, we think that is not going to work.

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 9.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 03:41 PM
    I should ask if Python is working.... Are you able to run extensions using it, such as Lasso or Ridge Regression?

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 10.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 04:53 PM
    Yes, Python works using Kernel-Ridge Regression. R-square =.117

    ------------------------------
    Ian Hobbs
    ------------------------------



  • 11.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 05:34 PM
    So what do I need to do now exactly?

    ------------------------------
    Ian Hobbs
    ------------------------------



  • 12.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 05:40 PM
    Let me check one other thing:
     
    Edit > Options > File Locations

    Please make sure that the radio button "Installed with IBM SPSS Statistics" is selected.



    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 13.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 11:08 PM
    Yes, that is exactly what it looks like. What do I need to do next?

    ------------------------------
    Ian Hobbs
    ------------------------------



  • 14.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Thu January 26, 2023 09:10 AM
    The only things I can think of at this point would be:

    1) To change the radio button selection to the second choice - "Other installation of R" and point it to the Z:\R location.

    2) Install R on the C: drive and point to that installation.

    I've been in contact with a developer who may be able to lend a hand; I have asked for his help. As for me, if these two options I've suggested don't work, I'm at a loss as to why, especially since Python appears to work from the Z drive location with the settings just as they are. It may well be a bug in the system that we will want to take a look at.

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 15.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL
    Best Answer

    Posted Thu January 26, 2023 09:49 AM
    Hello @Ian Hobbs, this may be caused by installing Statistics to the root of a drive (in this case your Z: drive). It appears that the separate R language interpreter is not setup to handle that.

    I suggest that you:

    1. Uninstall Statistics from Z:\
    2. Create a new directory under Z:\ such as Z:\SPSS
    3. Reinstall Statistics to the sub-directory created in step #2 above

    Let us know if this fixes your problem.

    Best,
    ​​

    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 16.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Fri January 27, 2023 05:26 PM
    Edited by Ian Hobbs Fri January 27, 2023 05:42 PM
    Hello Curtis, 

    Thank you for your help. I uninstalled SPSS 29 from drive Z:\ and reinstalled it to drive C:\. I did not create a new directory because when I ran SPSS 29 from drive C:\ and ZEROINFL again, a different error occurred: 

    So I opened a new syntax and ran SHOW EXPATHS PLUGINS., again, to make sure everything was back in C:\ drive, and this was the output:  


    Then I tried BEGIN PROGRAM R., as Rick suggested earlier and this was the output:

    >Error # 4702 in column 6. Text: (
    >An unexpected symbol was encountered on an output command.
    >Execution of this command stops.

    >Error # 4700 in column 7. Text: sessionInfo
    >An output command contains an unrecognized keyword. The recognized keywords
    >are OUTFILE, RECORDS, TABLE, NOTABLE ENCODING and BOM.

    >Error # 4702 in column 18. Text: (
    >An unexpected symbol was encountered on an output command.

    >Error # 4702 in column 19. Text: )
    >An unexpected symbol was encountered on an output command.

    >Error # 4702 in column 20. Text: )
    >An unexpected symbol was encountered on an output command.

    >Error # 4700 in column 1. Text: end
    >An output command contains an unrecognized keyword. The recognized keywords
    >are OUTFILE, RECORDS, TABLE, NOTABLE ENCODING and BOM.

    >Error # 4700 in column 5. Text: program
    >An output command contains an unrecognized keyword. The recognized keywords
    >are OUTFILE, RECORDS, TABLE, NOTABLE ENCODING and BOM.




    I'm not sure what I'm doing wrong. What do I do now? Thanks. 


    ------------------------------
    Ian Hobbs
    ------------------------------



  • 17.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Sat January 28, 2023 11:02 AM
    Hello @Ian Hobbs,

    Thank you or trying the move to C: drive. Based upon the results you received from "SHOW EXTPATHS PLUGINS.", it appears that you properly installed Statistics to "C:\Program Files\IBM\SPSS Statistics".

    However the error is the same as you received when installing to the root of the Z: drive. In fact I can replicate the error you are seeing from:

    BEGIN PROGRAM R.
    print(sessionInfo())
    end program.  

    ...if I omit the "BEGIN PROGRAM R." and the "end program." lines, and run only the "print(sessionInfo())" line above.

    Just to be super sure you are running the syntax correctly, please copy and paste the three lines above into a syntax window, select and highlight all three lines of the syntax, then press the green run button in the syntax editor toolbar and let me know if that makes any difference in the output you receive.

    Regards,

    ------------------------------
    Curtis Browning
    SPSS Statistics Architect
    ------------------------------



  • 18.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Sat January 28, 2023 03:41 PM
    Hello @Curtis Browning,

    I followed your directions and this was the output:


    What is our next step? 

    Thanks, 
    ​​​​​

    ------------------------------
    Ian Hobbs
    ------------------------------



  • 19.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    IBM Champion
    Posted Sat January 28, 2023 03:51 PM
    This is good progress.  R and the R connection are working.  The psci package, which STATS ZEROINFL depends on should have been installed automatically with STATS ZEROINFL, but it apparently wasn't.

    So go to Extensions > Install Python and R Modules and install it.  If you don't have that menu item, get STATS PACKAGE INSTALL (Install Python and R Packages) from the Extension Hub.

    --





  • 20.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Sat January 28, 2023 05:35 PM
    Thank you for your help, @Jon Peck. I'm relieved to hear that we're making progress. I followed your directions and received this for the output: 

    I checked the Extension Hub, again, and it shows that the STATS ZEROINFL package is already installed. What else do I do? Thank you! 


    ------------------------------
    Ian Hobbs
    ------------------------------



  • 21.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    IBM Champion
    Posted Sat January 28, 2023 06:12 PM
    That's not what I told you to install.  I said to install the psci module, which is an R package on CRAN that STATS ZEROINFL uses.

    --





  • 22.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Sun January 29, 2023 04:33 PM
    Edited by Ian Hobbs Sun January 29, 2023 06:14 PM


  • 23.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    IBM Champion
    Posted Sun January 29, 2023 07:54 PM
    This is what I said.  Emphasis added.  It's the psci package that is missing, and you can install it using the PACKAGE INSTALL extension.

    This is good progress.  R and the R connection are working.  The psci package, which STATS ZEROINFL depends on should have been installed automatically with STATS ZEROINFL, but it apparently wasn't.

    So go to Extensions > Install Python and R Modules and install it.  If you don't have that menu item, get STATS PACKAGE INSTALL (Install Python and R Packages) from the Extension Hub.

    --


  • 24.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Sun January 29, 2023 04:50 PM
    Edited by Ian Hobbs Sun January 29, 2023 06:13 PM
    @Jon Peck, It appears that uninstalling and reinstalling ZEROINFL on the Extension Hub fixed the issue. Thank you for your help!  

    I have just one last question. One of the dependent variables provided this output from the Zero-Inflated Count Model: 



    How do I fix this? Thank you! 



    ------------------------------
    Ian Hobbs
    ------------------------------



  • 25.  RE: SPSS 28.0.1.1 and R Extension STATS ZEROINFL

    Posted Wed January 25, 2023 11:23 AM
    NOTE: The errors I see above I can reproduce exactly if I do not run BEGIN PROGRAM R. but only

    print(sessionInfo())
    end program.  

    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------