4  Body weight of fleas

Last modified on 03. January 2026 at 19:55:28

“A quote.” — Dan Meyer

4.1 General background

4.2 Theoretical background

4.3 R packages used

4.4 Data

4.4.1 Linear

R Code [show / hide]
jump_weight_tbl <- tibble(x = abs(rnorm(21, 3, 4)),
                          y = 10 + 1.2 * x + rnorm(21, 0, 2)) |>
  mutate_all(round, 1) |> 
  rename(weight = x, jumplength = y)
Figure 4.1: foo (A) foo (B) foo
R Code [show / hide]
library(mvtnorm)

sigma <- matrix(c(4,2,2,3), ncol=2)
x <- rmvnorm(n = 21, mean=c(1,2), sigma=sigma) |> 
  as_tibble() |> 
  rename(weight = V1, bodylength = V2)
Warning: The `x` argument of `as_tibble.matrix()` must have unique column names if
`.name_repair` is omitted as of tibble 2.0.0.
ℹ Using compatibility `.name_repair`.
R Code [show / hide]
colMeans(x)
    weight bodylength 
 0.6086656  1.5456209 
R Code [show / hide]
var(x)
             weight bodylength
weight     4.081841   1.308154
bodylength 1.308154   2.970152
Figure 4.2: foo (A) foo (B) foo

4.4.2 Non-linear

R Code [show / hide]
jump_weight_non_linear_tbl <- tibble(x = abs(rnorm(32, 3, 4)),
                                     y = 0.15*x^3 - 2.2*x^2 + 8.8*x + 3.2 + rnorm(32, 0, 1)) |>
  rename(weight = x, jumplength = y)
Figure 4.3: foo (A) foo (B) foo

4.5 Data availability

The data is available as txt-Files under https://github.com/jkruppa/biodatascience.

4.6 Alternatives

Further tutorials and R packages on XXX

4.7 Glossary

term

what does it mean.

4.8 The meaning of “Models of Reality” in this chapter.

  • itemize with max. 5-6 words

4.9 Summary

References