plot_transition: Show fonction used for transition

Description Usage Arguments Details Value Author(s) Examples

View source: R/plot_transition.R

Description

Plot the transition function

Usage

1
plot_transition(result = NULL, parameters = NULL, sizes = c(0, 40), ...)

Arguments

result

A result object

parameters

Set of parameters. If both result and parameters are indicated, parameters have priority.

sizes

The range of possible sizes

...

Parameters for plot() such as main= or ylim=

Details

plot_transition show fonction used for transition

Value

Nothing

Author(s)

Marc Girondot

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
## Not run: 
library(embryogrowth)
data(nest)
formated <- FormatNests(nest)
data(resultNest_4p_SSM)
# Get a set of parameters without transition
x1 <- resultNest_4p_SSM$par
# Generate a set of parameters with transition
x2 <- switch.transition(x1)
x2 <- x2[names(x2)!="transition_P"]
x2["transition_S"] <- 4
pfixed <- c(rK=2.093313, transition_P=20)
resultNest_4p_transition <- searchR(parameters=x2, fixed.parameters=pfixed, 
temperatures=formated, integral=integral.Gompertz, M0=1.7, 
hatchling.metric=c(Mean=39.33, SD=1.92))
data(resultNest_4p_transition)
# show the model for smallest size
plotR(resultNest_4p_transition, ylim=c(0,0.3))
# show the model for larger sizes
plotR(resultNest_4p_transition, set.par=2, ylim=c(0,0.3))
# plot model for both together
plotR(resultNest_4p_transition, set.par=c(1,2), ylim=c(0,0.3), 
       col=c("red", "black"), legend=list("Initial", "End"))
plot_transition(result=resultNest_4p_transition, las=1, sizes=c(0,40))
compare_AIC(one.model=list(resultNest_4p_SSM), two.models=list(resultNest_4p_transition))
# Note that the model with fitted transition_P is trivial. Embryos grow fast until  
# they reach hatchling size and then growth rate becomes null!

## End(Not run)

embryogrowth documentation built on June 4, 2021, 9:05 a.m.