stati_stics: Compute simulated/observed statistics

Description Usage Arguments Details Value Note See Also Examples

View source: R/stati_stics.R

Description

Compute statistics for evaluation of the STICS outputs against observations. This function can be used for one USM or to compare outputs from different model versions or parameter values.

Usage

1
stati_stics(..., obs_name = NULL)

Arguments

...

Either a folder path or the output from eval_output. If several objects are detected, make a comparison between them.

obs_name

A vector of observation file name(s). Optionnal, required only if ... is a link. Must have the form c(Dominant,Dominated) for mixed crops. See details.

Details

If obs_name is not provided, the function tries to guess it using the built-in algorithm from read_obs. See respective documentation for more details.

Value

A data.frame with statistics for each simulation. The data.frame has a description attribute that gives the description of the column names

Note

Because this function has the purpose to assess model quality, all statistics are computed on dates were observations are present only. So the simulation mean is only the mean on dates with observations, not the overall simulation mean.

See Also

This function is largely inspired from the evaluate() function from the SticsEvalR package

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
library(sticRs)
# Exemple 1:
tests= stati_stics("dummy/path/simulation",
                   obs_name = c("Wheat.obs","Pea.obs"))
attr(tests,which = "description")

# Exemple 2, stats for a comparison between simulations:
stati_stics(Simulation_1,Simulation_2,
            obs_name = c("Wheat.obs","Pea.obs"))
# Equivalent to:
stati_stics("dummy/path/simulation_1","dummy/path/simulation_2",
            obs_name = c("Wheat.obs","Pea.obs"))


## End(Not run)

VEZY/sticRs documentation built on Oct. 1, 2018, 1:06 p.m.