s_ancova_j {junco} | R Documentation |
Junco Extended ANCOVA Function
Description
Extension to tern:::s_ancova, 3 extra statistics are returned
-
lsmean_se
: Marginal mean and estimated SE in the group. -
lsmean_ci
: Marginal mean and associated confidence interval in the group. -
lsmean_diffci
: Difference in mean and associated confidence level in one combined statistic. In addition, the LS mean weights can be specified. In addition, also a NULL .ref_group can be specified, the lsmean_diff related estimates will be returned as NA.
Usage
s_ancova_j(
df,
.var,
.df_row,
variables,
.ref_group,
.in_ref_col,
conf_level,
interaction_y = FALSE,
interaction_item = NULL,
weights_emmeans = "counterfactual"
)
Arguments
df |
: need to check on how to inherit params from tern::s_ancova |
.var |
( |
.df_row |
( |
variables |
(named
|
.ref_group |
( |
.in_ref_col |
( |
conf_level |
( |
interaction_y |
( |
interaction_item |
( |
weights_emmeans |
( |
Value
returns a named list of 8 statistics (3 extra compared to tern:::s_ancova()
).
See Also
Other Inclusion of ANCOVA Functions:
a_summarize_ancova_j()
,
a_summarize_aval_chg_diff_j()
Examples
library(dplyr)
library(tern)
df <- iris |> filter(Species == "virginica")
.df_row <- iris
.var <- "Petal.Length"
variables <- list(arm = "Species", covariates = "Sepal.Length * Sepal.Width")
.ref_group <- iris |> filter(Species == "setosa")
conf_level <- 0.95
s_ancova_j(df, .var, .df_row, variables, .ref_group, .in_ref_col = FALSE, conf_level)