# Matrix \eqn{W_{kl} = \int_{-\infty}^{\infty} h_k(u) \int_{-\infty}^{u}
# h_l(v)dvdu}
W_matrix <- function(num_r,num_s, hermite_norm){
integrand <- function(x,r,s, hermite_norm){
hermite_vec <- hermite_function_N(r,x)
hermite_integral_vec <- hermite_int_lower(s,x)
result <- hermite_integral_vec[s+1,]*hermite_vec[r+1,]
return(result)
}
result <- matrix(rep(0,(num_r+1)*(num_s+1)), nrow=(num_r+1),ncol=(num_s+1),
byrow = TRUE)
for (r in c(0:num_r)) {
for (s in c(0:num_s)) {
result[r+1,s+1] <- stats::integrate(function(t){integrand(t,r,s)},
lower=-Inf,upper=Inf)$value
}
}
return(result)
}
# Vector \eqn{z_{k} = \int_{-\infty}^{\infty} h_k(u)du}
z_vector <- function(num_r){
result <- hermite_int_full(num_r)
return(result)
}
h_norm_serialized <-
hermite_normalization_N(N=75)
W_serialized <- W_matrix(75,75)
z_serialized <- z_vector(75)
h_k_mat <-
hermite_function_N(N=75, x=0)
h_int_lower_zero_serialized <- hermite_int_lower(N=75,x=0,
hermite_function_matrix=h_k_mat)
h_int_upper_zero_serialized <- hermite_int_upper(N=75,x=0,
hermite_function_matrix=h_k_mat)
x_lower_serialized <- seq(-10,-6.05,by=0.05)
x_lower_serialized <- c(x_lower_serialized,seq(-6,-0.01,by=0.01))
x_upper_serialized <- seq(0,6,by=0.01)
x_upper_serialized <- c(x_upper_serialized, seq(6.05,10,by=0.05))
x_full_domain_serialized <- c(x_lower_serialized,x_upper_serialized)
h_int_lower_serialized <- hermite_int_lower(N=75,x_lower_serialized)
h_int_upper_serialized <- hermite_int_upper(N=75,x_upper_serialized)
h_int_full_domain_serialized <- cbind(h_int_lower_serialized,
h_int_upper_serialized)
shift_pvec <- c(rep(0,680), rep(1,681))
scale_pvec <- c(rep(1,680), rep(-1,681))
root_x_serialized <- c(
-13.4064873381449,
-12.8237997494878,
-12.3429642228597,
-11.9150619431142,
-11.521415400787,
-11.1524043855851,
-10.8022607536847,
-10.4671854213428,
-10.1445099412928,
-9.83226980777796,
-9.52896582339012,
-9.23342089021917,
-8.94468921732548,
-8.66199616813451,
-8.38469694041626,
-8.11224731116279,
-7.84418238446082,
-7.58010080785749,
-7.31965282230454,
-7.06253106024887,
-6.8084633528588,
-6.55720703192154,
-6.30854436111214,
-6.0622788326143,
-5.81823213520351,
-5.57624164932992,
-5.33615836013836,
-5.09784510508913,
-4.86117509179121,
-4.62603063578716,
-4.39230207868268,
-4.15988685513103,
-3.92868868342767,
-3.69861685931849,
-3.46958563641859,
-3.24151367963101,
-3.01432358033116,
-2.78794142398199,
-2.56229640237261,
-2.33732046390688,
-2.11294799637119,
-1.88911553742701,
-1.66576150874151,
-1.44282597021593,
-1.22025039121895,
-0.997977436098105,
-0.775950761540146,
-0.554114823591617,
-0.332414692342232,
-0.11079587242244,
0.110795872422439,
0.332414692342232,
0.554114823591617,
0.775950761540147,
0.997977436098105,
1.22025039121895,
1.44282597021593,
1.66576150874151,
1.88911553742701,
2.11294799637119,
2.33732046390688,
2.56229640237261,
2.78794142398199,
3.01432358033115,
3.24151367963101,
3.46958563641859,
3.69861685931849,
3.92868868342767,
4.15988685513102,
4.39230207868269,
4.62603063578715,
4.86117509179121,
5.09784510508914,
5.33615836013836,
5.57624164932992,
5.81823213520351,
6.06227883261431,
6.30854436111214,
6.55720703192154,
6.8084633528588,
7.06253106024887,
7.31965282230454,
7.58010080785748,
7.84418238446082,
8.1122473111628,
8.38469694041626,
8.66199616813452,
8.94468921732548,
9.23342089021917,
9.52896582339011,
9.83226980777798,
10.1445099412928,
10.4671854213428,
10.8022607536847,
11.1524043855851,
11.521415400787,
11.9150619431142,
12.3429642228597,
12.8237997494878,
13.4064873381449)
weight_w_serialized <-
c(
5.90806786503136e-79,
1.97286057487966e-72,
3.08302899000352e-67,
9.01922230369306e-63,
8.5188830817621e-59,
3.45947793647628e-55,
7.19152946346327e-52,
8.5975639548245e-49,
6.42072520534952e-46,
3.18521787783607e-43,
1.10047068271427e-40,
2.74878488435702e-38,
5.11623260438513e-36,
7.27457259688755e-34,
8.06743427870996e-32,
7.10181222638551e-30,
5.03779116621317e-28,
2.91735007262933e-26,
1.3948415260688e-24,
5.56102696165903e-23,
1.86499767513031e-21,
5.30231618313183e-20,
1.28683292112102e-18,
2.68249216476029e-17,
4.82983532170321e-16,
7.54889687791516e-15,
1.02887493735095e-13,
1.22787851441014e-12,
1.2879038257316e-11,
1.19130063492909e-10,
9.74792125387198e-10,
7.07585728388953e-09,
4.56812750848495e-08,
2.62909748375378e-07,
1.35179715911035e-06,
6.22152481777787e-06,
2.56761593845493e-05,
9.51716277855104e-05,
0.000317291971043298,
0.000952692188548627,
0.00257927326005911,
0.00630300028560803,
0.0139156652202319,
0.0277791273859335,
0.0501758126774286,
0.0820518273912242,
0.121537986844104,
0.163130030502783,
0.198462850254186,
0.218892629587438,
0.21889262958744,
0.198462850254186,
0.163130030502783,
0.121537986844105,
0.0820518273912245,
0.0501758126774285,
0.0277791273859335,
0.0139156652202319,
0.00630300028560803,
0.0025792732600591,
0.000952692188548612,
0.000317291971043307,
9.51716277855083e-05,
2.56761593845492e-05,
6.22152481777791e-06,
1.35179715911039e-06,
2.62909748375372e-07,
4.56812750848485e-08,
7.07585728388976e-09,
9.74792125387174e-10,
1.19130063492908e-10,
1.28790382573152e-11,
1.22787851441009e-12,
1.02887493735099e-13,
7.54889687791549e-15,
4.82983532170316e-16,
2.68249216476006e-17,
1.28683292112115e-18,
5.30231618313228e-20,
1.8649976751302e-21,
5.56102696165923e-23,
1.3948415260688e-24,
2.9173500726293e-26,
5.03779116621325e-28,
7.10181222638503e-30,
8.06743427870959e-32,
7.27457259688751e-34,
5.11623260438556e-36,
2.74878488435699e-38,
1.10047068271428e-40,
3.18521787783571e-43,
6.42072520534916e-46,
8.59756395482604e-49,
7.19152946346429e-52,
3.45947793647629e-55,
8.51888308176195e-59,
9.0192223036942e-63,
3.0830289900037e-67,
1.9728605748794e-72,
5.90806786503142e-79
)
save(h_norm_serialized,W_serialized,z_serialized,
root_x_serialized,weight_w_serialized,
h_int_lower_zero_serialized,
h_int_upper_zero_serialized,
h_int_lower_serialized,
h_int_upper_serialized,
h_int_full_domain_serialized,
x_full_domain_serialized,
shift_pvec,
scale_pvec,
file = "sysdata.rda",compress="xz")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.