Displaying 2 results from an estimated 2 matches for "ratio_max".
2012 Jun 13
2
asign variables in a "for" loop
...solution but I
can't think of a way to solve it. I'd really appreciate any help you can
offer me!
I'll provide a small example. Given a dataframe data.txt that looks like
this:
ID freq Var Var_mean Ratio_mean Var_median
Ratio_median Var_sum Ratio_min Var_max Ratio_max Var_min
Ratio_sum
134 5 2.140 0.447 4.784 0.272 7.881 2.237 0.957
0.833 2.568 0.187 11.437
30 4 1.743 0.450 3.873 0.358 4.869 1.799 0.968
0.915 1.904 0.169 10.329
137 4 1.401 0.304 4.614 0.310 4.514 1.215 1...
2013 Apr 20
0
Calculate confidence intervals in mgcv for unconditional on the, smoothing parameters
...* smooth_matrix))
set.seed(123)
R_sim <- 100000
mean_val <- rep(0, nrow(cov_beta_diff))
coef_diff <- mvrnorm(n = R_sim, mu = mean_val , Sigma = cov_beta_diff)
Xp <- predict(gam_fit, type = "lpmatrix")
sim_bet <- Xp %*% t(coef_diff)
abs_ratio <- abs(sim_bet / stdv_f_x)
ratio_max <- apply(abs_ratio, 2, max)
cv <- quantile(ratio_max, probs = 0.95)
So everything is fine until this point. My problem is:everything has
been presented conditional on the smoothing parameter estimated in
gam_fit. How can I "calculate" a critical value for thesimultaneous
confide...