pst_sim: Power analysis for projected score test

Description Usage Arguments Value

Description

Conducts power analysis for PST along with several other methods for range of user-specified mbetas, ks, and ns. User uses this function to conduct simulation study. Offers option for parallelization. Wraps and combines results from sim_setup() and pstest()

Usage

1
2
3
4
5
pst_sim(nsim = 500, seed = 2019, mbetas = c(0, 0.005, 0.01, 0.015,
  0.02, 0.025, 0.03, 0.035, 0.04, 0.045, 0.05, 0.06, 0.07, 0.08, 0.09,
  0.1), ks = c(40, 60, 70, 80, 100), n = 100, p = 1000,
  model = "normal", sigma = 1, alpha = 0.05, rho = 0.9,
  betasp = TRUE, rs = c(10, 20, 50), mc.cores = 1, doplot = TRUE)

Arguments

nsim

number of simulations to conduct to assess power, defaults to 500

seed

chosen seed for simulations, defaults to 2019

mbetas

vector of mean beta values

ks

vector of percentage of independent variables with nonzero signal

n

number of observations, defaults to 100

p

number of betas, defaults to 1000

model

can be specified as 'normal' (default) for linear regression, otherwise does logistic regression

sigma

defaults to 1

alpha

significance level, defaults to 0.05

rho

spatial correlation in G parameter, AR1 structure, efaults to 0.9

betasp

indicator of presence of spatial information, defaults to TRUE

rs

investigator-specified set of "contrasts" of G, defaults to c(10, 20, 50)

mc.cores

number of cores to run on, defaults to 1

doplot

if TRUE, makes plots; if FALSE, does not. This produces one power plot per k across a range of mbetas

Value

A data frame of power values for PST as well as aSPU, SKAT, and Sum for a range of mbetas and ks. Also plots the power curves.


carolynlou/pstestr documentation built on June 3, 2019, 6:21 p.m.