getPreds: Calculate predictions using scenario accounting for...

View source: R/getPreds.R

getPredsR Documentation

Calculate predictions using scenario accounting for estimation uncertainty

Description

This function generates predictions from model and inputted scenario

Usage

getPreds(
  modObj = NULL,
  beta = NULL,
  varcov = NULL,
  scen,
  link = "binary-logit",
  seed = 6886,
  sims = 100
)

Arguments

modObj

model object (glm or lm), it's recommended to just supply values to beta and varcov

beta

vector of regression estimates, usually obtained from coef of the model object

varcov

variance covariance matrix

scen

scenario object generated from scenBuild

link

link function, options include: binary-logit, binary-probit, count, normal

Value

a data.frame object that includes columns for each of the treatment values and then a final column with the predictions for that treatment. the number of predictions generated per treatment correspond to the number of simulations (sims) run.


s7minhas/simHelper documentation built on April 22, 2022, 2:48 a.m.