Coder Social home page Coder Social logo

Error in d * log.hazard + log.survival : non-conformable arrays In addition: Warning message: In wk * rep(x$P, each = nk) : longer object length is not a multiple of shorter object length about jm HOT 3 CLOSED

drizopoulos avatar drizopoulos commented on May 26, 2024
Error in d * log.hazard + log.survival : non-conformable arrays In addition: Warning message: In wk * rep(x$P, each = nk) : longer object length is not a multiple of shorter object length

from jm.

Comments (3)

KatleenJ avatar KatleenJ commented on May 26, 2024

any update?

from jm.

drizopoulos avatar drizopoulos commented on May 26, 2024

Do you have a reproducible example? Also, you could try the newer JMbayes2.

from jm.

marazzoli avatar marazzoli commented on May 26, 2024

Hello there. Just starting with JM and having an issue that seems to be related to the size of the matrixes from the two sbumodels, even though they originate from the same df.
Your help would be greatly appreciated.

Here's the error that I get after running JMbayes2:

Error in jointModelBayes(mod_fi_onegroup, cox_fit, timeVar = "week") :
sample sizes in the longitudinal and event processes differ.

this is the reprex() {though it differs from the error message above}
#longitudinal submodel
mod_fi_onegroup=lme(fi ~ week + one_group,
random= ~ week|id,
corr=corAR1(form = ~ 1|id),
control=lmeControl(opt='optim'),
data=fi.long, method="REML",
na.action = na.exclude)
#> Error in lme(fi ~ week + one_group, random = ~week | id, corr = corAR1(form = ~1 | : could not find function "lme"

#coxph time-to-event submodel
cox_fit<-coxph(Surv(age_weeks, censored) ~ one_group + cluster (id),
data = fi.long, x=TRUE, model = TRUE)
#> Error in coxph(Surv(age_weeks, censored) ~ one_group + cluster(id), data = fi.long, : could not find function "coxph"

library(JMbayes2)
#> Warning: package 'JMbayes2' was built under R version 4.3.2
#> Loading required package: survival
#> Loading required package: nlme
#> Loading required package: GLMMadaptive
#> Warning: package 'GLMMadaptive' was built under R version 4.3.2
#> Loading required package: splines
joint_ca <- jm(cox_fit, mod_fi_onegroup, timeVar = "week")
#> Warning in jm(cox_fit, mod_fi_onegroup, timeVar = "week"): unknown names in
#> control: timeVar
#> Error in eval(expr, envir, enclos): object 'mod_fi_onegroup' not found

from jm.

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.