Coder Social home page Coder Social logo

Error on getPsModel about cohortmethod HOT 5 CLOSED

ohdsi avatar ohdsi commented on June 12, 2024
Error on getPsModel

from cohortmethod.

Comments (5)

schuemie avatar schuemie commented on June 12, 2024

My first guess is that results is not a valid object as generated by createPs, suggesting the problem already occurred earlier. Could you try

str(attr(results, "coefficients"))

and see if it confirms it is a Named num? If not, can you see if createPs threw an error?

from cohortmethod.

fdefalco avatar fdefalco commented on June 12, 2024

str(attr(results,"coefficients"))
Named num [1:1547] -1.19 0 0 0 0 ...

  • attr(*, "names")= chr [1:1547] "(Intercept)" "17" "18" "19" ...

It appears to be a Named num, createPs did not throw any errors.

from cohortmethod.

schuemie avatar schuemie commented on June 12, 2024

Ah, I'm guessing all coefficients except the intercept are 0. Are you by any chance using a really small example data set?

from cohortmethod.

fdefalco avatar fdefalco commented on June 12, 2024

Yes, that does appear to be the case when I look at the data coming back from attr(results,"coefficients"). I'm not sure what is considered small, but in this case I have 11k people in my target cohort, 38k in my comparator and 3k in the outcome cohort. I'll email you the R code so you can check it out first hand.

from cohortmethod.

schuemie avatar schuemie commented on June 12, 2024

We figured out that this was caused by not excluding the target and comparator drugs from the covariates. The new version of CohortMethod will mention the need for this more clearly.

from cohortmethod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.