View source: R/episode_fusion.R
episode_strategy | R Documentation |
Define a strategy to merge data of the same episode of a participant
episode_strategy(type, ...)
type |
name of the strategy to apply |
... |
variable names in weekly (columns) & parameters to apply (see details) |
Parameters:
The parameters will depends on the type of strategy
For a simple strategy (with no parameter attached to each variable), it will be the name of column to apply the strategy to
For a complex strategy it will be the variable name as argument name passed to this function and the parameters for the variables as the argument value
Type of strategies:
Several kind of strategies are useasble:
Minimal value of the variable for the episode
Maximal value of the variable for the episode
Any value TRUE will output TRUE
Average value of variable for the episode
Take the first available value (not NA) in each episode surveys of participant
Take the last available value (not NA) in each episode surveys of participant
Worst Strategy algorithm, see details
General warning:
You should be very careful by defining strategy on what data it will be applied. Some strategies will depends on how variables has been recoded or not. Some checks are done but they are not perfects.
Worst strategy:
Worst strategy will expect
Other episodes:
episode_build()
,
episode_compute()
,
episode_design()
,
episode_fusion()
,
episode_fusion.simple_strategy()
,
episode_fusion.worst_strategy()
,
episode_fusion_strategy()
,
episode_prepare_data()
,
episode_select_participants()
## Not run:
# Create an "any" strategy for some columns
episode_strategy("any", "chills", "cough", "fever")
# Define a worst strategy for "take.temp" column in weekly, and give the response order to use
episode_strategy("worst", "take.temp"=c('Yes','DontKnow','No'))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.