[R] help with 'cem' for r 2.14.2

Duncan Murdoch murdoch.duncan at gmail.com
Mon May 20 22:51:47 CEST 2013

On 13-05-20 2:18 PM, Kimberley Armstrong wrote:
> Hello,
> I am trying to use R for propensity score matching in SPSS.  I have version 21 of SPSS and I downloaded R 2.14.2 as directed as well as the R Essentials plug-in.

I think you need to talk to SPSS support for this.  We have no 
connection with SPSS here.

As well, the current release of R is 3.0.1.  R 2.14.2 is about 15 months 
old; that's ancient history as far as we're concerned (though it may be 
cutting edge for SPSS).

Duncan Murdoch

I have run a test for R and it appears to be running correctly.  I then 
downloaded psmatching3 and have tried to use the PS matching dialog in 
SPSS.  However, I continue to run into problems as SPSS reports that 
there is no 'cem' file.  I have tried to download cem separately from 
your website (both the new and the older version) and to install it 
either in R or as an extension in SPSS but I receive the following errors:
> IN R:
> utils:::menuInstallLocal()
> Warning in install.packages(choose.files("", filters = Filters[c("zip",  :
>    'lib = "C:/Program Files/R/R-2.14.2/library"' is not writable
> Error in install.packages(choose.files("", filters = Filters[c("zip",  :
>    unable to create '~/R/library"' >  $HOME/.Renviron'
> In addition: Warning message:
> In dir.create(userdir, recursive = TRUE) :
>    cannot create dir 'C:\Users\Kimberley\Documents\R\library"' >  $HOME', reason 'Invalid argument'
> In SPSS:
>    FILE='C:\Users\Kimberley\Documents\WB Somalia\R Testing\Bor Ber Sheik Ainabo merged -and hacked - Copy.sav'.
> SET SEED = 1234.
> 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")
> Warning message:
> In library(cem, logical.return = TRUE) : there is no package called 'cem'
> Installing package(s) into 'C:/Program Files/IBM/SPSS/Statistics/21/extensions'
> (as 'lib' is unspecified)
> Warning message:
> In getDependencies(pkgs, dependencies, available, lib) :
>    package 'cem' is not available (for R version 2.14.2)
> Error in library(cem) : there is no package called 'cem'
> Warning message:
> In OK() : No warnings in estimation or matching procedure
> Error: could not find function "imbalance"
> I would definitely appreciate any suggestions or feedback!
> Thanks!
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list