fit_body_mass: Fit body mass models

Description Usage Arguments Value Examples

View source: R/models.R

Description

Fits the models when the heaviest individual is focal.

Usage

1
fit_body_mass(fit_method, model, DF1)

Arguments

fit_method

"PQL" or "PQL/L" in quotes

model

"full", "nosocial", "nosex", "null" in quotes

DF1

dataset to use: same_sex_weight or diff_sex_weight

Value

a list (fitted model with spaMM)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
## Not run: 
data(same_sex_weight)
data(diff_sex_weight)

mod_mass_full_same_PQL <- fit_body_mass(fit_method = "PQL",
                                       model = "full",
                                       DF1 = same_sex_weight)
mod_mass_full_diff_PQL <- fit_social(fit_method = "PQL",
                                    model = "full",
                                    DF1 = diff_sex_weight)

mod_mass_full_same_PQLL <- fit_social(fit_method = "PQL/L",
                                     model = "full",
                                     DF1 = same_sex_weight)
mod_mass_full_diff_PQLL <- fit_social(fit_method = "PQL/L",
                                     model = "full",
                                     DF1 = diff_sex_weight)

mod_mass_nosocial_same_PQL <- fit_social(fit_method = "PQL",
                                        model = "nosocial",
                                        DF1 = same_sex_weight)
mod_mass_nosocial_diff_PQL <- fit_social(fit_method = "PQL",
                                        model = "nosocial",
                                        DF1 = diff_sex_weight)

mod_mass_nosocial_same_PQLL <- fit_social(fit_method = "PQL/L",
                                         model = "nosocial",
                                         DF1 = same_sex_weight)
mod_mass_nosocial_diff_PQLL <- fit_social(fit_method = "PQL/L",
                                         model = "nosocial",
                                         DF1 = diff_sex_weight)

mod_mass_nosex_same_PQL <- fit_social(fit_method = "PQL",
                                     model = "nosex",
                                     DF1 = same_sex_weight)
mod_mass_nosex_diff_PQL <- fit_social(fit_method = "PQL",
                                     model = "nosex",
                                     DF1 = diff_sex_weight)

mod_mass_nosex_same_PQLL <- fit_social(fit_method = "PQL/L",
                                      model = "nosex",
                                      DF1 = same_sex_weight)
mod_mass_nosex_diff_PQLL <- fit_social(fit_method = "PQL/L",
                                      model = "nosex",
                                      DF1 = diff_sex_weight)

mod_mass_null_same_PQL <- fit_social(fit_method = "PQL",
                                    model = "null",
                                    DF1 = same_sex_weight)
mod_mass_null_diff_PQL <- fit_social(fit_method = "PQL",
                                    model = "null",
                                    DF1 = diff_sex_weight)

mod_mass_null_same_PQLL <- fit_social(fit_method = "PQL/L",
                                     model = "null",
                                     DF1 = same_sex_weight)
mod_mass_null_diff_PQLL <- fit_social(fit_method = "PQL/L",
                                     model = "null",
                                     DF1 = diff_sex_weight)

## End(Not run)

hyenaproject/vullioud_2018 documentation built on Aug. 4, 2021, 12:01 a.m.