Skip to contents

This function fits linear models for specified dependent variables using given predictors and covariates. It returns a data frame containing model summaries.

Usage

simple_lm(
  dependent_df,
  pred_df,
  cov_df,
  stat2return = c("all", "tval", "pval", "tval_list")
)

Arguments

dependent_df

A data frame containing the dependent variables.

pred_df

A data frame containing the predictor variables.

cov_df

A data frame containing the covariate variables.

stat2return

A character string specifying which statistic to return ("statistic", "p.value", or "full"). Default is "full". "statistic" returns only the t-value for permutation purposes, "p.value" returns only the p-value for simulation analysis, and "full" returns all information for the parametric test.

Value

A data frame containing model summaries. Depending on stat2return, the output can include different statistics:

  • If stat2return is "all", the output includes unstandardized and standardized coefficients, standard errors, t-values, confidence intervals, p-values, adjusted p-values, and significance markers.

  • If stat2return is "tval", the output includes only the t-values.

  • If stat2return is "tval", the output includes only the t-values as a list.

  • If stat2return is "pval", the output includes only the p-values.