mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-09-12 18:09:39 +02:00
51 lines
1.1 KiB
R
51 lines
1.1 KiB
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/regression_model.R
|
|
\name{regression_model_uv}
|
|
\alias{regression_model_uv}
|
|
\title{Create a regression model programatically}
|
|
\usage{
|
|
regression_model_uv(
|
|
data,
|
|
outcome.str,
|
|
args.list = NULL,
|
|
fun = NULL,
|
|
vars = NULL,
|
|
...
|
|
)
|
|
}
|
|
\arguments{
|
|
\item{data}{data set}
|
|
|
|
\item{outcome.str}{Name of outcome variable. Character vector.}
|
|
|
|
\item{args.list}{List of arguments passed to 'fun' with 'do.call'.}
|
|
|
|
\item{fun}{Name of function as character vector or function to use for model creation.}
|
|
|
|
\item{vars}{character vector of variables to include}
|
|
|
|
\item{...}{ignored for now}
|
|
}
|
|
\value{
|
|
object of standard class for fun
|
|
}
|
|
\description{
|
|
Create a regression model programatically
|
|
}
|
|
\examples{
|
|
\dontrun{
|
|
gtsummary::trial |>
|
|
regression_model_uv(outcome.str = "age")
|
|
gtsummary::trial |>
|
|
regression_model_uv(
|
|
outcome.str = "age",
|
|
fun = "stats::lm",
|
|
args.list = NULL
|
|
)
|
|
gtsummary::trial |> regression_model_uv(
|
|
outcome.str = "trt",
|
|
fun = "stats::glm",
|
|
args.list = list(family = stats::binomial(link = "logit"))
|
|
)
|
|
}
|
|
}
|