Skip to content

Rhat values not available for covariance matrix (using diagonal structure) #143

@ZiyuanW12

Description

@ZiyuanW12

Hi!

If I use the diagonal matrix for the covariance matrix, there is no Rhat values for the elements in the covariance matrix but I could derive effective sample sizes.

I have included the code and results below. I was wondering if there is a way to derive Rhat values for the variance of each random effects.

fix_for <- as.formula(paste("y ~ ", " GEN  + LOOP_1 + LOOP_2 + LOOP_3 +" ,
                        paste(colnames(BS), collapse= "+")))
ran_for <- as.formula(paste("~ 1 + ", paste(colnames(BS), collapse= "+")))
lm =lme(fixed=fix_for,
            random = list(patid = pdDiag(ran_for)),
sv <- coxph( Surv(eventtime, event) ~ x , data = train_surv_data, x = TRUE)
jointFit2 <- jm(sv, lm, time_var = "time",
                n_iter = 35000, n_burnin = 2000, n_chains = 3, cores = 3, parallel ="multicore")
jointFit2$statistics$Rhat[c( "D")]

$D
      Point est. Upper C.I.
 [1,]         NA         NA
 [2,]         NA         NA
 [3,]         NA         NA
 [4,]         NA         NA
 [5,]         NA         NA
 [6,]         NA         NA
 [7,]         NA         NA
 [8,]         NA         NA
 [9,]         NA         NA
[10,]         NA         NA
[11,]         NA         NA
[12,]         NA         NA
[13,]         NA         NA
[14,]         NA         NA
[15,]         NA         NA
[16,]         NA         NA
[17,]         NA         NA
[18,]         NA         NA
[19,]         NA         NA
[20,]         NA         NA
[21,]         NA         NA

The effective sample size:

$D
   D[1, 1]    D[2, 1]    D[3, 1]    D[4, 1]    D[5, 1]    D[6, 1]    D[2, 2] 
5526.09533    0.00000    0.00000    0.00000    0.00000    0.00000  316.52445 
   D[3, 2]    D[4, 2]    D[5, 2]    D[6, 2]    D[3, 3]    D[4, 3]    D[5, 3] 
   0.00000    0.00000    0.00000    0.00000  713.98948    0.00000    0.00000 
   D[6, 3]    D[4, 4]    D[5, 4]    D[6, 4]    D[5, 5]    D[6, 5]    D[6, 6] 
   0.00000  776.73394    0.00000    0.00000  294.23561    0.00000   53.04701 

Thank you very much for your support!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions