# Assuming you have already defined y, mu_d_logit, g_i, and n_topics# Initializeinitial_values <-warm_gp_initialization(y, mu_d_logit, g_i, n_topics)# Run MCMC# Define hyperparametersalpha_lambda <-2beta_lambda <-0.5alpha_sigma <-2beta_sigma <-2alpha_phi <-2beta_phi <-0.5alpha_sigma_phi <-2beta_sigma_phi <-2alpha_Gamma <-2beta_Gamma <-2# Run MCMCmcmc_results <-mcmc_sampler_optimized(y, mu_d_logit, g_i, n_iterations =5000, initial_values, alpha_lambda, beta_lambda, alpha_sigma, beta_sigma, alpha_phi, beta_phi, alpha_sigma_phi, beta_sigma_phi, alpha_Gamma, beta_Gamma)
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
7.965e-03 4.746e-03 6.712e-05 1.607e-03
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
0.001085 0.004428 0.007620 0.010563 0.021212
var1
8.726205
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
0.1378736 0.0122489 0.0001732 0.0068060
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
0.1266 0.1290 0.1316 0.1447 0.1683
var1
3.239018
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
-0.3993709 0.0071782 0.0001015 0.0034949
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
-0.4181 -0.4034 -0.3992 -0.3938 -0.3879
var1
4.218384
[1] "Overall acceptance rate: 0.468"
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
-0.783790 0.200259 0.002832 0.069990
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
-1.1324 -0.9476 -0.8020 -0.6241 -0.3698
var1
8.18684
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
-0.178708 0.378524 0.005353 0.242464
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
-1.18346 -0.23113 -0.02400 0.06656 0.19386
var1
2.437192
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
7.808309 0.218415 0.003089 0.104091
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
7.329 7.708 7.804 7.940 8.207
var1
4.402884
[1] "Overall acceptance rate: 0.505"
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
-2.5676 1.0679 0.0151 0.5692
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
-4.3484 -3.2507 -2.8063 -1.6897 -0.4076
var1
3.520475
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
-48.8098 23.1416 0.3273 20.8284
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
-82.54 -70.80 -47.73 -29.51 -11.87
var1
1.234454
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
-3.9658 1.2095 0.0171 0.5620
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
-5.6484 -4.8701 -4.2541 -3.3206 -0.9343
var1
4.631304
[1] "Overall acceptance rate: 0.523"
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
[1,] 1.356 0.2432 0.00344 0.02390
[2,] 1.326 0.9756 0.01380 0.09703
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
var1 1.178 1.293 1.361 1.387 1.423
var2 1.101 1.216 1.258 1.278 1.304
var1 var2
103.5917 101.0924
[1] "Overall acceptance rate: 0.483"
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
7.965e-03 4.746e-03 6.712e-05 1.607e-03
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
0.001085 0.004428 0.007620 0.010563 0.021212
var1
8.726205
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
0.1378736 0.0122489 0.0001732 0.0068060
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
0.1266 0.1290 0.1316 0.1447 0.1683
var1
3.239018
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
-0.3993709 0.0071782 0.0001015 0.0034949
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
-0.4181 -0.4034 -0.3992 -0.3938 -0.3879
var1
4.218384
[1] "Overall acceptance rate: 0.468"
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
-0.783790 0.200259 0.002832 0.069990
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
-1.1324 -0.9476 -0.8020 -0.6241 -0.3698
var1
8.18684
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
-0.178708 0.378524 0.005353 0.242464
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
-1.18346 -0.23113 -0.02400 0.06656 0.19386
var1
2.437192
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
7.808309 0.218415 0.003089 0.104091
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
7.329 7.708 7.804 7.940 8.207
var1
4.402884
[1] "Overall acceptance rate: 0.505"
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
-2.5676 1.0679 0.0151 0.5692
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
-4.3484 -3.2507 -2.8063 -1.6897 -0.4076
var1
3.520475
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
-48.8098 23.1416 0.3273 20.8284
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
-82.54 -70.80 -47.73 -29.51 -11.87
var1
1.234454
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
-3.9658 1.2095 0.0171 0.5620
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
-5.6484 -4.8701 -4.2541 -3.3206 -0.9343
var1
4.631304
[1] "Overall acceptance rate: 0.523"
Iterations = 1:5000
Thinning interval = 1
Number of chains = 1
Sample size per chain = 5000
1. Empirical mean and standard deviation for each variable,
plus standard error of the mean:
Mean SD Naive SE Time-series SE
[1,] 1.356 0.2432 0.00344 0.02390
[2,] 1.326 0.9756 0.01380 0.09703
2. Quantiles for each variable:
2.5% 25% 50% 75% 97.5%
var1 1.178 1.293 1.361 1.387 1.423
var2 1.101 1.216 1.258 1.278 1.304
var1 var2
103.5917 101.0924
[1] "Overall acceptance rate: 0.483"