You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: intro.qmd
+4-9Lines changed: 4 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ fig-height: 3
4
4
fig-dpi: 192
5
5
fig-format: png
6
6
engine: julia
7
+
execute:
8
+
cache: true
7
9
julia:
8
10
exeflags: ["--project"]
9
11
---
@@ -675,13 +677,6 @@ The apparent distribution of the estimates of $\sigma_1$ in @fig-dsm01_bs_sigma_
675
677
A [kernel density estimate](https://en.wikipedia.org/wiki/Kernel_density_estimation) approximates a probability density from a finite sample by blurring or smearing the positions of the sample values according to a *kernel* such as a narrow Gaussian distribution (see the linked article for details).
676
678
In this case the distribution of the estimates is a combination of a continuous distribution and a spike or point mass at zero as shown in a histogram, @fig-dsm01_bs_sigma_hist.
677
679
678
-
:::{.callout-note collapse="true"}
679
-
680
-
### Adjust the alpha in multiple histograms
681
-
682
-
Use a lower alpha in the colors for multiple histograms so the bars behind another color are more visible
683
-
:::
684
-
685
680
```{julia}
686
681
#| code-fold: true
687
682
#| fig-cap: Histogram of bootstrap variance-components as standard deviations from model dsm01
Copy file name to clipboardExpand all lines: longitudinal.qmd
+59-22Lines changed: 59 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ fig-height: 3
4
4
fig-dpi: 192
5
5
fig-format: png
6
6
engine: julia
7
+
execute:
8
+
cache: true
7
9
julia:
8
10
exeflags: ["--project"]
9
11
---
@@ -44,8 +46,8 @@ using LinearAlgebra
44
46
using MixedModels
45
47
using MixedModelsMakie
46
48
using Random
47
-
using RCall
48
49
using StandardizedPredictors
50
+
using Statistics
49
51
```
50
52
51
53
and declare some constants, if not already defined.
@@ -96,7 +98,8 @@ draw(
96
98
:resp => "Ramus bone length (mm)",
97
99
color=:Subj,
98
100
) *
99
-
(visual(Scatter) + visual(Lines));
101
+
(visual(Scatter) + visual(Lines)),
102
+
scales(Color = (; legend = false,));
100
103
figure=(; size=(600, 450)),
101
104
)
102
105
```
@@ -105,22 +108,48 @@ Unfortunately, unless there are very few subjects, such figures, sometimes calle
105
108
106
109
A preferred alternative is to plot response versus time with each subject's data in a separate panel (@fig-eglayout).
107
110
108
-
```{r}
111
+
```{julia}
109
112
#| code-fold: true
110
113
#| fig-cap: Length of ramus bone versus age for a sample of 20 boys. The panels are ordered rowwise, starting at the bottom left, by increasing bone length at age 8.
To aid comparisons between subjects the axes are the same in every panel and the order of the panels is chosen systematically - in @fig-eglayout the order is by increasing bone length at 8 years of age.
@@ -170,7 +199,7 @@ If the purpose of the experiment is to create a predictive model for the growth
170
199
171
200
Alternatively, we could center at the average observed time, 8.75 years, or at some other value of interest.
172
201
173
-
The important thing is to make clear what the `(Itercept)` parameter estimates represent.
202
+
The important thing is to make clear what the `(Intercept)` parameter estimates represent.
174
203
The [StandardizedPredictors.jl](https://github.com/beacon-biosignals/StandardizedPredictors.jl) package allows for convenient representations of several standardizing transformations in a `contrasts` specification for the model.
175
204
An advantage of this method of coding a transformation is that the coefficient names include a concise description of the transformation.
In @fig-pastesdot we plot the two strength measurements on each of the samples within each of the batches and join up the average strength for each sample.
0 commit comments