OHDSI Home | Forums | Wiki | Github

Custom covariates for PS

(Anna Ostropolets) #1

This is the first time I’m using custom concept list for the propensity score model, so I’m not sure how exactly it works. If I need a specific list of concepts + demographics, can I just select concepts to include and add demographics from the default list? This will mean that I leave concepts to exclude empty.

(Seng Chan You) #2

@aostropolets Could you share the code you’ve worked?

(Anna Ostropolets) #3

I can get the code, but Atlas screenshot should be enough, right?

(Seng Chan You) #4

@aostropolets Though I’ve never used this before, but I think this would work :slight_smile:

(Anna Ostropolets) #5

Actually, the reason for this question is that I’m getting an error when running analysis with custom PS concepts.
The error occurs in the beginning of Cohort Method analysis and is as follows:
Error in strsplit(excludeConceptIds, split = “;”) :
non-character argument

Maybe, @schuemie has any ideas on what can be wrong here (I would be very grateful! :slight_smile: ).

(Seng Chan You) #6

@aostropolets I cannot understand why you have an error with ‘excludedConceptIds’, because it looks like you’ve not used them.

It would be easier for me to find the reason of error if you share the code. Sorry, I’m not Martijn

(Martijn Schuemie) #7

This looks like a problem that was fixed a long time ago in the package skeleton. Unfortunately, updates move from skeleton to Hydra to Atlas to study package at a glacial pace.

Could you try replacing your R/CohortMethod.R file with this one?

(Anna Ostropolets) #8

@SCYou Thanks for reply! I asked Martijn because he knows these packages inside out and deals with these errors all the time :slight_smile:
@schuemie Thanks a lot for suggestion! I tried it and doesn’t give me that error anymore. On the other hand, not it’s throwing
Warning: file("") only supports open = “w+” and open = “w+b”: using the former
Error in readChar(fileName, file.info(fileName)$size) :
invalid ‘nchars’ argument
I read that it may be because of an old version of Shiny but re-installing didn’t solve the problem. Do you think it’s about the package itself or about environment? I just run another PLE, which worked just fine; the only major difference was custom PS covariates.

(Seng Chan You) #9

It usually occurred when your file/folder system is not accessible. When did this error occur with which function?

(Anna Ostropolets) #10

At the beginning of cohort analysis. The thing is that I run the same package but without custom pa covariates and it runs smoothly…