Add an evaluation criterion to a hypothesis in a study object

add_eval(study, type, evaluation, description = "", hypothesis_id = NULL)

Arguments

study

A study list object with class scivrs_study

type

"corroboration" or "falsification" (or "c"/"f")

evaluation

A logical representation of these conditions using the criteria IDs, parentheses, &, | and ! (e.g., "(c1 & c2) | (c3 & !c4)")

description

A verbal description of the conditions for corroborating the hypothesis

hypothesis_id

The id for the hypothesis (index or character) if NULL, assigns to the last hypothesis in the list

Value

A study object with class scivrs_study

Examples


s <- study() %>%
  add_hypothesis("H1", "Petal width and length will be positively correlated.") %>%
  add_analysis("A1", cor.test(dat$Petal.Width, dat$Petal.Length)) %>%
  add_criterion("sig", "p.value", "<", 0.05) %>%
  add_criterion("pos", "estimate", ">", 0) %>%
  add_eval("corroboration", "sig & pos",
           "Petal width is significantly and positively correlated to length"
           ) %>%
  add_eval("falsification", "sig & !pos",
           "Petal width is significantly and negatively correlated to length"
           )
s
#> Demo Study
#> ----------
#> 
#> * Hypotheses: H1
#> * Data: None
#> * Analyses: A1
#> 
#> Hypothesis H1: Petal width and length will be positively correlated.
#> 
#> Criterion sig:
#> * p.value < 0.05 is unknown
#> * p.value = p.value
#> 
#> Criterion pos:
#> * estimate > 0 is unknown
#> * estimate = estimate
#> 
#> Conclusion: You may need to run `study_analyse()`
#> * Corroborate (sig & pos): 
#> * Falsify (sig & !pos):