JMbayes | Joint Models for Longitudinal and Survival Data using MCMC | Machine Learning library
kandi X-RAY | JMbayes Summary
kandi X-RAY | JMbayes Summary
JMbayes: Joint Models for Longitudinal and Survival Data under the Bayesian Approach.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of JMbayes
JMbayes Key Features
JMbayes Examples and Code Snippets
Community Discussions
Trending Discussions on JMbayes
QUESTION
I'm trying to fit a joint model of longitudinal and time-to-event data using the JMbayes package, to predict risk of cardiac arrest as more symptom data becomes available over time. To start, I am fitting a univariate model, but I aim to incorporate a number of longitudinal outcomes once I have the code running, which is why I'm using the mvJointModelBayes() function.
However, when I run I try to run the function I come across the error below.
Error in { : task 1 failed - "addition: incompatible matrix dimensions: 500x1 and 3000x1"
I have used the same code as provided in the mvJMBayes vignette using pbc2 data, adapted to my dataset, but keep encountering the error. I can't find any obvious way in which my dataframes differ to the pbc2 dataset to be causing the error.
...ANSWER
Answered 2019-Oct-14 at 13:03I found out that it works if id
is a numeric variable instead of a factor and if id
occurs in the same order in both data sets. Running the following code before model fitting solves the issue:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install JMbayes
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page