EHDEN / Trajectories

5 stars 2 forks source link

Error running runEventPairsAnalysis(): missing value where TRUE/FALSE needed #11

Closed solis9753 closed 4 years ago

solis9753 commented 4 years ago

I got the following error while running runEventPairsAnalysis():


[1] "There are 2084 event pairs that are going to be analyzed."
[1] "We use Bonferroni multiple test correction, therefore p-value threshold 0.05/2084=2.39923224568138e-05 is used in this analysis."
[1] "Analyzing event pair 201826 -> 140673 (total progress 0%, # sign pairs: 0, # sign directional pairs: 0)..."
Error in if (expected_prob > 1) { : missing value where TRUE/FALSE needed```

Could you please have a look?
Kadri0 commented 4 years ago

Hi @solis9753 Could you please check 2 things: 1) Do you know what your CDM version is? 2) Are any columns empty/NULL in the following tables in the @resultsSchema with your @prefix: d1_summary, d2_summary, d1d2_summary, summary;

solis9753 commented 4 years ago

Hi @Kadri0

  1. I am not sure about the version of the CDM (specific table is empty). Looking into it.
  2. Yes, age column is empty in all of them, since I set the parameter off in the analysis.
solis9753 commented 4 years ago

Hi again @Kadri0, Regarding my previous response, the CDM version is 5.31 . Also, the age column is empty as I mentioned but I do not know why. What I meant is that I set trajectoryAnalysisArgs$addBirths = F which may be irrelevant.

Kadri0 commented 4 years ago

@solis9753 Could you take a look at your condition occurrence table to see whether the column condition_start_date or condition_start_datetime is empty?

solis9753 commented 4 years ago

No they are not empty. What is empty is birth_datetime in person table.

Kadri0 commented 4 years ago

@solis9753 I changed the column used for age calculation. Hopefully the age should be calculated now.

solis9753 commented 4 years ago

OK. I still get the same error but bare with me; I will run CodeToRun.R again from the beginning tomorrow morning and get back to you ASAP.

solis9753 commented 4 years ago

Hi,

the function has succesfully concluded!

Best