Menu

installing 'cem'

2013-05-22
2013-08-28
  • Kim Armstrong

    Kim Armstrong - 2013-05-22

    Hello,
    I have SPSS 21 and have installed R 2.14 and the R plug-in for 21, I now want to use the PS Matching dialog box, but have had nothing but problems. i continue to get errors regarding the 'cem' package. I have tried to install using the R console and using an exe file through SPSS - while the downloads of such files appear successful, I continue to get errors when I run the dialog.

    ARe SPSS 21, R 2.14 and PSMatching3 all compatible? I have tried both PsMatching 3 and 2, but still have issues.

    Would appreciate any input.

    Thanks.
    Kim

     
    • Felix Thoemmes

      Felix Thoemmes - 2013-05-23

      Hello Kim,
      we are aware of the "cem" installation problem and have fixed it. We
      will release a new version very soon.
      In the meantime, there is a potential work-around.

      Download an older version of cem, (e.g., 1.1.2) here
      http://gking.harvard.edu/cem
      and then in R type

      install.packages("combinat")
      install.packages("C:/Downloads/cem_1.1.2.tar.gz", repos = NULL, type = "source")

      where you need to replace C:/Downloads with the path where you have
      downloaded the tar.gz file.

      Hope that helps,
      Felix

      On Wed, May 22, 2013 at 2:04 AM, Kim Armstrong kimaa@users.sf.net wrote:

      Hello,
      I have SPSS 21 and have installed R 2.14 and the R plug-in for 21, I now
      want to use the PS Matching dialog box, but have had nothing but problems. i
      continue to get errors regarding the 'cem' package. I have tried to install
      using the R console and using an exe file through SPSS - while the downloads
      of such files appear successful, I continue to get errors when I run the
      dialog.

      ARe SPSS 21, R 2.14 and PSMatching3 all compatible? I have tried both
      PsMatching 3 and 2, but still have issues.

      Would appreciate any input.

      Thanks.
      Kim


      installing 'cem'


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/psmspss/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • Michael Haslip

        Michael Haslip - 2013-06-02

        Hi Felix,
        I have the same set-up as Kim (R version 2.14.2; SPSS 21). When I ran PSM in SPSS using your minimaltest.sav file this is the output syntax I received:

        GET
        FILE='C:\Documents and Settings\Michael & Meishi\Desktop\SPSS 21 TEST\minimaltest.sav'.
        DATASET NAME DataSet1 WINDOW=FRONT.
        SET SEED = 1234.
        SET PRINTBACK=NONE.
        Loading required package: MASS

        MatchIt (Version 2.4-20, built: 2011-10-24)

        Please refer to http://gking.harvard.edu/matchit for full documentation

        or help.matchit() for help with commands supported by MatchIt.

        Package SparseM (0.97) loaded.
        To cite, see citation("SparseM")

        Loading required package: nlme
        Loading required package: lattice
        Loading required package: randomForest
        Error: package 'randomForest' could not be loaded
        In addition: Warning messages:
        1: package 'cem' was built under R version 3.0.1
        2: In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc) :
        there is no package called 'randomForest'
        Error: object 'pt3' not found
        Loading required package: randomForest
        Error: package 'randomForest' could not be loaded
        In addition: Warning messages:
        1: package 'cem' was built under R version 3.0.1
        2: In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc) :
        there is no package called 'randomForest'
        Warning message:
        In OK() : No warnings in estimation or matching procedure
        Error: could not find function "imbalance"


        I had a similar problem with installing the cem package in R, but I thought I succeeded with a workaround using a local file to install cem zip file from the CRAN website. I think I'm running psmatching2 (rather than 3). Can you help?

        Thanks!

         
        • Felix Thoemmes

          Felix Thoemmes - 2013-06-05

          Hello Michael,
          it seems like you did everything correct. Have you tired installing
          version 3 as well? Have you made sure to run SPSS in Admin mode
          (right-click on SPSS executable and run as Admin)?
          Also, we are on the cusp of releasing the next version which will
          eliminate much of the hassle of having to install R packages. We have
          integrated the most critical code components directly and got rid of
          the need to installing many packages. If it is not very urgent, you
          could wait for this release.
          Best,
          Felix

          On Sat, Jun 1, 2013 at 10:29 PM, Michael Haslip mhaslip@users.sf.net wrote:

          Hi Felix,
          I have the same set-up as Kim (R version 2.14.2; SPSS 21). When I ran PSM in
          SPSS using your minimaltest.sav file this is the output syntax I received:

          GET
          FILE='C:\Documents and Settings\Michael & Meishi\Desktop\SPSS 21
          TEST\minimaltest.sav'.
          DATASET NAME DataSet1 WINDOW=FRONT.
          SET SEED = 1234.
          SET PRINTBACK=NONE.
          Loading required package: MASS

          MatchIt (Version 2.4-20, built: 2011-10-24)

          Please refer to http://gking.harvard.edu/matchit for full documentation

          or help.matchit() for help with commands supported by MatchIt.

          Package SparseM (0.97) loaded.
          To cite, see citation("SparseM")

          Loading required package: nlme
          Loading required package: lattice
          Loading required package: randomForest
          Error: package 'randomForest' could not be loaded
          In addition: Warning messages:
          1: package 'cem' was built under R version 3.0.1
          2: In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc =
          lib.loc) :
          there is no package called 'randomForest'
          Error: object 'pt3' not found
          Loading required package: randomForest
          Error: package 'randomForest' could not be loaded
          In addition: Warning messages:
          1: package 'cem' was built under R version 3.0.1
          2: In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc =
          lib.loc) :
          there is no package called 'randomForest'
          Warning message:
          In OK() : No warnings in estimation or matching procedure
          Error: could not find function "imbalance"


          I had a similar problem with installing the cem package in R, but I thought
          I succeeded with a workaround using a local file to install cem zip file
          from the CRAN website. I think I'm running psmatching2 (rather than 3). Can
          you help?

          Thanks!


          installing 'cem'


          Sent from sourceforge.net because you indicated interest in
          https://sourceforge.net/p/psmspss/discussion/general/

          To unsubscribe from further messages, please visit
          https://sourceforge.net/auth/subscriptions/

           
  • Thomas Chung

    Thomas Chung - 2013-08-27

    Felix, I'm also having issues with SPSS 21 / R 2.14.2 and cem package not being installed. I tried working this around like you said but get the following error. It cites the "randomForest" package much like the poster above. Do you have any solution? Also, is the new release coming out soon?

    install.packages("C:/Users/Tom/Downloads/cem_1.1.2.tar_0.gz", repos = NULL, type = "source")
    Installing package(s) into ‘C:/Users/Tom/Documents/R/win-library/2.14’
    (as ‘lib’ is unspecified)
    ERROR: dependency 'randomForest' is not available for package 'cem'
    * removing 'C:/Users/Tom/Documents/R/win-library/2.14/cem'
    Warning messages:
    1: running command 'C:/PROGRA~1/R/R-214~1.2/bin/x64/R CMD INSTALL -l "C:/Users/Tom/Documents/R/win-library/2.14" "C:/Users/Tom/Downloads/cem_1.1.2.tar_0.gz"' had status 1
    2: In install.packages("C:/Users/Tom/Downloads/cem_1.1.2.tar_0.gz", :
    installation of package ‘C:/Users/Tom/Downloads/cem_1.1.2.tar_0.gz’ had non-zero exit status

     

    Last edit: Thomas Chung 2013-08-27
    • Felix Thoemmes

      Felix Thoemmes - 2013-08-28

      Dear Thomas (and other with the same problem),
      The only solution that I can currently see is to also install
      randomForest by hand. Source can be downloaded here:
      http://cran.r-project.org/web/packages/randomForest/index.html

      It is not a package that we need for PSMATCHING, but it is a
      dependency of CEM (meaning CEM wants to install it and refuses to run
      if it won't).

      The new version will hopefully be released within the next couple of
      weeks. It includes many more features and we want to test them
      thoroughly before releasing.

      Best,
      Felix

      On Tue, Aug 27, 2013 at 12:39 AM, Thomas Chung tkchung@users.sf.net wrote:

      Felix, I'm also having issues with SPSS 21 / R 2.14.2 and cem package not
      being installed. I tried working this around like you said but get the
      following error. It cites the "randomForest" package much like the poster
      above. Do you have any solution? Also, is the new release coming out soon?

      /Tom/Documents/R/win-library/2.14’
      (as ‘lib’ is unspecified)
      ERROR: dependency 'randomForest' is not available for package 'cem'
      * removing 'C:/Users/Tom/Documents/R/win-library/2.14/cem'
      Warning messages:
      1: running command 'C:/PROGRA~1/R/R-214~1.2/bin/x64/R CMD INSTALL -l
      "C:/Users/Tom/Documents/R/win-library/2.14"
      "C:/Users/Tom/Downloads/cem_1.1.2.tar_0.gz"' had status 1
      2: In install.packages("C:/Users/Tom/Downloads/cem_1.1.2.tar_0.gz", :
      installation of package ‘C:/Users/Tom/Downloads/cem_1.1.2.tar_0.gz’ had
      non-zero exit status


      installing 'cem'


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/psmspss/discussion/general/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.