-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
139 lines (139 loc) · 4.29 KB
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
library(pmcmcDiagnostics)
getNamespaceExports(pmcmDiagnostics)
getNamespaceExports("pmcmDiagnostics")
library(pmcmcDiagnostics)
getNamespaceExports(pmcmcDiagnostics)
getNamespaceExports("pmcmcDiagnostics")
source('~/Dropbox/research/stuff-to-test/pmcmcDiagnostics/tests-own/99_helper_diagnostics_model_comparison_run_tests.R', echo=TRUE)
library(pmcmcDiagnostics)
getNamespaceExports("pmcmcDiagnostics")
source('~/Dropbox/research/stuff-to-test/pmcmcDiagnostics/tests-own/99_helper_diagnostics_model_comparison_run_tests.R', echo=TRUE)
my_test_benchmark <- function(burn){
a <- dic_cpp(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, burn);
b <- waic_cpp(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, burn);
return(list(a, b))
}
bench_me <- microbenchmark::microbenchmark(lppd_dic_waic_test(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, 9990),
my_test_benchmark(9990))
bench_me
unvec_p_dic <- dic(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, 9990)
unvec_p_dic <- dic_cpp(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, 9990)
test_val2 <- test_fun1(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, 9950)
test_val2
unvec_p_dic
test_val1 <- dic(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, 9998)
test_val2 <- dic_cpp(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, 9998)
print(test_val1, digits = 22)
print(test_val2, digits = 22)
print(all.equal(test_val1, test_val2))
microbenchmark::microbenchmark(dic(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, 9900),
dic_cpp(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, 9900))
test_val1 <- waic(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, 9998)
test_val2 <- waic_cpp(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, 9998)
print(test_val1, digits = 22)
print(test_val2, digits = 22)
print(all.equal(test_val1, test_val2))
my_bench <- microbenchmark::microbenchmark(waic(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, 9995),
waic_cpp(y = y_t, X_list = out_pgas_CA_09$xtraj, num_counts = num_counts, 9995))
print(my_bench)
usethis::use_package("RColorBrewer")
?matplot
?abline
?points
?text
?legend
?combn
?image
?contour
?mpfr
?plot
?lines
?pdf
?dev.off
?par
?hist
?abline
?plot
usethis::use_package("gridExtra")
usethis::use_package("ggplot2")
usethis::use_package("stats")
install.packages(c("HDInterval", "mcmcse", "rstan"), dependencies = TRUE)
install.packages("gird")
install.packages("grid")
install.packages
install.packages("grid")
package?gtools
1:10 <=2:12
1:10 <=2:13
1:10 <=2:11
rep(1, times = 10) <= rnorm(10) + rep(1, times = 10)
test_vec <- rnorm(10)
test_vec
rep(1, times = 10) <= test_veck + rep(1, times = 10)
rep(1, times = 10) <= test_vec + rep(1, times = 10)
sample.int(1:10)
sample.int(1:10, 10)
sample(1:10)
test_vec <- sample(1:10)
test_vec2 <- sample(1:10)
test_vec
test_vec2
c(T, F, T) && c(T, T, T)
c(T, F, T) & c(T, T, T)
c(T, F, F) & c(T, T, T)
usethis::use_package("mcmcse")
usethis::use_package("rstan")
usethis::use_package("HDInterval")
View?
write_csv?
?write_csv
usethis::use_package("readr")
?View
?sd
?quantile
?curve
library(pmcmcDiagnostics)
KZ::analyse_mcmc_convergence2
KZ::analyse_mcmc_convergence2()
pmcmcDiagnostics::analyse_mcmc_convergence2()
pmcmcDiagnostics::analyse_mcmc_convergence2
library(pmcmcDiagnostics)
diag(3, 2, 2)
library(pmcmcDiagnostics)
dqrng::dqrnorm(1, 2.0, 1.0)[1]
library(pmcmcDiagnostics)
dqrng::dqrnorm(1, 2.0, 1.0)
str(dqrng::dqrnorm(1, 2.0, 1.0))
str(15)
str(1.5)
library(pmcmcDiagnostics)
list(2)
library(pmcmcDiagnostics)
sign(rep(1, times = 10))
c(1, -1) == c(1,1)
library(pmcmcDiagnostics)
install.packages("rstan", dependencies = TRUE)
library(pmcmcDiagnostics)
install.packages("mcmcse")
install.packages("fftwtools")
install.packages("mcmcse")
library(pmcmcDiagnostics)
paste0(c("sigma_sq_xa",
"phi_xa",
"bet_xa"), 1:4)
paste0(c("sigma_sq_xa",
"phi_xa",
"bet_xa"), rep(1:4, each = 3))
library(pmcmcDiagnostics)
array(1:8, dim = c(2,2,2))
library(pmcmcDiagnostics)
?compute_sds
library(pmcmcDiagnostics)
cbind(a = 1:4, b = 5:8)
library(pmcmcDiagnostics)
?diagnostics_table
library(pmcmcDiagnostics)
matrix(1:4, nrow = 2)
inherits(matrix(1:4, nrow = 2),what = "matrix")
inherits(matrix(1:4, nrow = 2),what = "matrixx")
library(pmcmcDiagnostics)