
Univariate Regression Table
Source:R/MakeUnivariateRegressionTable.R
MakeUnivariateRegressionTable.RdCreates a list of univariate regression tables with variable labels and standardized coefficients (if specified).
UnivariateRegressionTable() was renamed to
MakeUnivariateRegressionTable() in SciDataReportR 20.5.0 to match the
package's Make* naming convention. It remains available as a
backwards-compatible synonym.
Usage
MakeUnivariateRegressionTable(
data,
outcome_vars,
predictor_vars,
covariates = NULL,
Standardize = FALSE,
Method = c("auto", "lm", "logistic"),
LogisticExponentiate = TRUE,
Data = lifecycle::deprecated(),
OutcomeVars = lifecycle::deprecated(),
PredictorVars = lifecycle::deprecated(),
Covars = lifecycle::deprecated()
)
UnivariateRegressionTable(
data,
outcome_vars,
predictor_vars,
covariates = NULL,
Standardize = FALSE,
Method = c("auto", "lm", "logistic"),
LogisticExponentiate = TRUE,
Data = lifecycle::deprecated(),
OutcomeVars = lifecycle::deprecated(),
PredictorVars = lifecycle::deprecated(),
Covars = lifecycle::deprecated()
)Arguments
- data
Dataframe containing the variables
- outcome_vars
Character vector of outcome variable names
- predictor_vars
Character vector of predictor variable names
- covariates
Character vector of covariate variable names (default: NULL)
- Standardize
Logical indicating whether to standardize numeric variables (default: FALSE)
- Method
Character. Regression method to use.
"auto"detects linear regression for numeric outcomes and logistic regression for two-level outcomes."lm"and"logistic"force one model family for all outcomes.- LogisticExponentiate
Logical. If
TRUE, logistic regression estimates are exponentiated and reported as odds ratios.- Data
Deprecated (since 19.15.0). Use
datainstead.- OutcomeVars
Deprecated (since 19.15.0). Use
outcome_varsinstead.- PredictorVars
Deprecated (since 19.15.0). Use
predictor_varsinstead.- Covars
Deprecated (since 19.15.0). Use
covariatesinstead.
Value
A list containing:
FormattedTable: A merged table with formatted regression results
LargeTable: A merged table with unformatted regression results
Results: A tidy dataframe with one row per estimated term. Columns:
Outcome,OutcomeLabel,OutcomeFamily,EffectType,Predictor,PredictorLabel,Term,Level,TermLabel,N,Estimate,StdError,ConfLow,ConfHigh,PValue,Significant, andReferenceValue. This dataframe can be filtered and passed directly toPlotForestFromTable().ModelSummaries: A list of fitted model objects
Metadata: Outcome families and analysis settings