create plots with a dependence
This commit is contained in:
@@ -44,7 +44,7 @@ library(latex2exp)
|
||||
#| cache: true
|
||||
#| echo: false
|
||||
#| collapse: true
|
||||
ns <- c(100, 200, 300, 400, 500)
|
||||
ns <- c(100, 200, 300, 400, 500, 600, 700, 800)
|
||||
Ks <- floor(sqrt(ns))
|
||||
as <- c(0.5, 1.0, 1.5, 2.0)
|
||||
|
||||
@@ -83,6 +83,7 @@ for (a in as) {
|
||||
#| collapse: true
|
||||
#| fig-cap: "Simulation of the smallest singular values w.r.t. a, n and k"
|
||||
results |>
|
||||
filter(dim_n <= 400) |>
|
||||
mutate(param_a = as.factor(param_a),
|
||||
dim_n = as.factor(dim_n)) |>
|
||||
group_by(param_a, dim_n) |>
|
||||
@@ -119,4 +120,26 @@ summary(model1)
|
||||
plot(model1)
|
||||
|
||||
```
|
||||
## Plot of n vs. ssv
|
||||
|
||||
```{r plot n vs ssv}
|
||||
results |>
|
||||
filter(dim_k %in% c(2, 6, 10)) |>
|
||||
mutate(param_a = as.factor(param_a),
|
||||
dim_k = as.factor(dim_k)) |>
|
||||
group_by(param_a, dim_k) |>
|
||||
ggplot(aes(dim_n, ssv, col=dim_k, shape=param_a, interaction(dim_k, param_a))) +
|
||||
geom_point(size=1.5) +
|
||||
geom_line() +
|
||||
scale_y_log10() +
|
||||
theme_bw() +
|
||||
labs(x=latex2exp::TeX("$n$"),
|
||||
y=latex2exp::TeX("Smallest singular value of $Q$"),
|
||||
title=latex2exp::TeX("Smallest singular value of $Q$ with respect to $n$, $k$, and $a$."),
|
||||
colour=latex2exp::TeX("$k$"),
|
||||
shape=latex2exp::TeX("$a$"))
|
||||
```
|
||||
```{r}
|
||||
Q <- compute_matrix(1, a=0.5, n=10, K = 3, function(n) matrix(rnorm(n), ncol = 1L), fv=dnorm, Fv=pnorm)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user