estimate: Estimate Outcome

Description Usage Arguments Value Examples

View source: R/estimate.R

Description

Estimate Outcome

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
estimate(
  outcome,
  covar,
  treat,
  data,
  sub_var = NULL,
  family = gaussian,
  type = "top",
  verbose = TRUE,
  ...
)

Arguments

outcome

character, outcome column.

covar

character, columns for covariates

treat

character, treatment assignment

data

data frame to use for analysis

sub_var

character, subgroup variable

family

Family for glm

type

'top' or 'sub' based on topline or subgroup.

verbose

Boolean. Should model output be printed?

...

other paramters passed to glm

Value

GLM model object

Examples

1
2
3
4
5
6
data(iris)
iris$treat <- sample(0:1, nrow(iris), replace = TRUE)
mm <- estimate(
  outcome = 'Sepal.Length',
  covar = 'Sepal.Width',
  treat = 'treat', data = iris)

anniejw6/testingtools documentation built on Jan. 26, 2021, 6:41 a.m.