I have recently installed R-essential and the "psmatching" program. All went well, until I performed (actually tried to perform) the analysis.
Basically, I have a cohort of patients, divided into two groups, and I try to compare their survival. I was recommended to perform a propensity score matching analysis in order to "adjust" for the initial differences in between the two groups.
Now, I have two issues.
In the ID variable I'm supposed to insert the two groups (a binary variable), in the covariates section all my confounders, but what I am supposed to insert in the second section of the custom dialog? At first I thought that in my ID box I must insert the index of my patients and in the second box the two groups - but I can't insert a categorical variable in that box. (see my attached file)
I tried to insert a random variable from my dataset to see how it runs. The SPSS "response" was:
**Error
psmatching3 Missing values in dataset.
Warning message:
In dir.create(Rgraphicpath, showWarnings = TRUE, recursive = FALSE) :
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf
5: In plot.window(...) : "interactive" is not a graphical parameter**
I don't have missing values in my dataset (in the covariates or the dependent variable introduced in the analysis).
I restarted the SPSS, re-performed the analysis without requesting the graphs and I've got another error message:
**Package SparseM (0.86) loaded.
To cite, see citation("SparseM")
Loading required package: lattice
Attaching package: 'Matrix'
The following object(s) are masked from package:base :
det
Attaching package: 'lme4'
The following object(s) are masked from package:stats :
AIC
Error in data.frame(dict, psspec, weightspec, stringsAsFactors = F) :
arguments imply differing number of rows: 5, 4**
What am I doing wrong?
Thank you.
LE 1: I am using SPSS v.19.0 and R2.10.1.
LE 2: I don't know what's the problem, but eventually I succeeded in analyzing my data. As I mentioned before, I wasn't able to insert my categorical data into the second box; so I ran the analysis with my categorical data in the ID box and the index variable in the treatment box. Then I copied the code into the Syntax and wrote the correct form of the code (with the categorical variable after TREAT and index variable after ID). It worked.
Hello,
in the box labeled ID variable you should indeed put in your unique
person identifier. In the other box where you encountered the error,
simply change your treatment variable to a numeric variable (usually
one would code a categorical SPSS variable into a numeric variable
with values 0 and 1). Some of the error messages that you are
reporting are new to me - never ceases to amaze me what kind of error
messages can pop out of this. Make sure that your complete dataset is
free of missing values. During one of the initial checks the whole
dataset is checked for missingness, not just the analysis variables.
One way around this would be to create a subset of your data that only
includes your missing data-free analytic variables.
Hope that helps - sorry that the error messages are so cryptic.
Felix
I have recently installed R-essential and the "psmatching" program. All went
well, until I performed (actually tried to perform) the analysis.
Basically, I have a cohort of patients, divided into two groups, and I try
to compare their survival. I was recommended to perform a propensity score
matching analysis in order to "adjust" for the initial differences in
between the two groups.
Now, I have two issues.
In the ID variable I'm supposed to insert the two groups (a binary
variable), in the covariates section all my confounders, but what I am
supposed to insert in the second section of the custom dialog? At first I
thought that in my ID box I must insert the index of my patients and in the
second box the two groups - but I can't insert a categorical variable in
that box.
I tried to insert a random variable from my dataset to see how it runs. The
SPSS "response" was:
**Error
psmatching3 Missing values in dataset.
Warning message:
In dir.create(Rgraphicpath, showWarnings = TRUE, recursive = FALSE) :
I have recently installed R-essential and the "psmatching" program. All went well, until I performed (actually tried to perform) the analysis.
Basically, I have a cohort of patients, divided into two groups, and I try to compare their survival. I was recommended to perform a propensity score matching analysis in order to "adjust" for the initial differences in between the two groups.
Now, I have two issues.
**Error
psmatching3 Missing values in dataset.
Warning message:
In dir.create(Rgraphicpath, showWarnings = TRUE, recursive = FALSE) :
'C:\Users\Dimitrie\AppData\Local\Temp\spss1616\RtmpqnnEID\RGraphics' already exists
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In min(x) : no non-missing arguments to min; returning Inf
2: In max(x) : no non-missing arguments to max; returning -Inf
3: In min(x) : no non-missing arguments to min; returning Inf
4: In max(x) : no non-missing arguments to max; returning -Inf
5: In plot.window(...) : "interactive" is not a graphical parameter**
I don't have missing values in my dataset (in the covariates or the dependent variable introduced in the analysis).
I restarted the SPSS, re-performed the analysis without requesting the graphs and I've got another error message:
**Package SparseM (0.86) loaded.
To cite, see citation("SparseM")
Loading required package: lattice
Attaching package: 'Matrix'
The following object(s) are masked from package:base :
det
Attaching package: 'lme4'
The following object(s) are masked from package:stats :
AIC
Error in data.frame(dict, psspec, weightspec, stringsAsFactors = F) :
arguments imply differing number of rows: 5, 4**
What am I doing wrong?
Thank you.
LE 1: I am using SPSS v.19.0 and R2.10.1.
LE 2: I don't know what's the problem, but eventually I succeeded in analyzing my data. As I mentioned before, I wasn't able to insert my categorical data into the second box; so I ran the analysis with my categorical data in the ID box and the index variable in the treatment box. Then I copied the code into the Syntax and wrote the correct form of the code (with the categorical variable after TREAT and index variable after ID). It worked.
Last edit: Dimitrie Siriopol 2014-08-22
Hello,
in the box labeled ID variable you should indeed put in your unique
person identifier. In the other box where you encountered the error,
simply change your treatment variable to a numeric variable (usually
one would code a categorical SPSS variable into a numeric variable
with values 0 and 1). Some of the error messages that you are
reporting are new to me - never ceases to amaze me what kind of error
messages can pop out of this. Make sure that your complete dataset is
free of missing values. During one of the initial checks the whole
dataset is checked for missingness, not just the analysis variables.
One way around this would be to create a subset of your data that only
includes your missing data-free analytic variables.
Hope that helps - sorry that the error messages are so cryptic.
Felix
On Fri, Aug 22, 2014 at 10:07 AM, Dimitrie Siriopol
dimisir@users.sf.net wrote: