generate_weak_dataset: Generate Weak Dataset

Description Usage Arguments

View source: R/generate_weak_dataset.R

Description

Generates clustered nonlinear spatial exposure effects in a linear model where distance distribution and count is correlated with the cluster function

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
generate_weak_dataset(
  n = 100,
  prop_cluster = c(0.5, 0.5),
  cluster_functions = list(fun_one = function(x) pweibull(x, shape = 6, scale = 0.5,
    lower.tail = FALSE), fun_two = function(x) 0),
  num_distances = list(Rural = 15, Urban = 15),
  rdist_generator = list(Rural = function(x) rbeta(x, 1, 1), Urban = function(x)
    rbeta(x, 1, 1)),
  prop_exposed = 0.95,
  Z = cbind(1, rbinom(n = n, 1, 0.5)),
  delta = c(26, -0.5),
  seed = NULL
)

Arguments

n

number of observations

prop_cluster

vector of cluster proportions

cluster_functions

list of length num_clusters

prop_exposed

proportion of observations with exposure to spatial features

Z

matrix of standard regression coefficients - assumes first column is an intercept

delta

vector of regression coefficients

seed

random number generator seed

mean_num_distances

mean number of simulated distances to include


apeterson91/STAPDPSimulations documentation built on Dec. 19, 2021, 3:43 a.m.