Description Usage Arguments Details Value Examples

Stats are the objects which specify 1) how model formulas should be created
from the model specification, and 2) how to actual fit statistical models.
Stats also have their own parameters which you can specify to change how
the stat is fit. Multiple stats can be specified for an aba model. The best
way to see all the available stats is the type `aba::stat_`

in the console
and look at the auto-completion.

1 |

`.model` |
an aba model. The model on which to set stats. |

`...` |
strings or aba stat object. Each comma-separated value will be
a different stat. If you specify a string, then the default stat params
will be used. Some stats require that you actually call them (e.g. |

`labels` |
vector of strings. Labels for printing & plotting. |

There is a broad collection of stats implemented in aba which we plan to
add to. Please feel free to request more. Also, there are certain extra
parameters which are common to all stats. These include `std.beta`

which
determines whether to z-score all variables prior to model fitting, and
`complete.cases`

which determines whether to only use individuals with all
available data within each group - outcome but across all predictor sets.

An abaModel object with stats sets.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ```
# create default stat object by specifying only a string
model <- aba_model() %>%
set_stats('glm')
# pass an actual stat object. This is useful to specify extra params
# such as `std.beta` and `complete.cases` which is common to all stats.
model <- aba_model() %>%
set_stats(
stat_glm(std.beta = TRUE, complete.cases = FALSE)
)
# some stats such as lme require parameters
# those variables are expected to exist in the eventual data
model <- aba_model() %>%
set_stats(
stat_lme(id = 'RID', time = 'YEARS_bl')
)
# you can see these extra stat params when you print the model
print(model)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.