SPSS and R for propensity score matching

I am very new to coding (apologies)
I downloaded "R_Essential_statistic28.0.1" for my version of SPSS (version 28), and downloaded R (version 4.2.1) to pull in the "propensity matching score" into SPSS. When I tried to run my data (which is formatted correctly), I got this error in SPSS: (...): package or namespace load failed for 'optmatch' in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCHeck= v[[j]]): there is no package called 'survey'

Please help (explanation in plain language preferred)! EB

Hi, Not sure how you're working between SPSS and R, but you need to install the package first.


Thank you very much. Is the "install.packages("survey")" command I need to put into R? I am not familiar with LUI...

yes, thats an R command.
What is LUI ?

thank you for your help!
my understanding is that a LUI is a linear user interface (I am used to the lay-person way of using computers- GUI- graphical user interface, so still working out how to download by typing in commands)... very helpful. Will try this in R today. I am a clinician in a burn ward, so on behalf of our patients, thank you for help on this project...

now I am getting an error in "install.package("survey"):
'lib = "C:/Program Files/ R/R-4.2.1/library"' is not writable
Error in install.packages(lib = .libPaths()[1L], dependencies = NA, type = t$ unable to install packages

Any suggestions?

You probably meant CLI - command line interface, run Rstudio with admin privileges and check if



Thank you for your help!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.