# expected_vbeta: Estimate the expected variance of beta In simGWAS: Fast Simulation of Large Case-Control GWAS Summary Statistics

## Description

Estimate the expected variance of beta. This is approximately expected(1/var(U)).

## Usage

 ```1 2``` ```expected_vbeta(N0, N1, snps, W, gamma.W, freq, GenoProbList = make_GenoProbList(snps = snps, W = W, freq = freq)) ```

## Arguments

 `N0` The number of Y=0 `N1` The number of Y=1 `snps` The snps at which we wish to compute the expected Z Score `W` The true causal SNPs (these need not be in "snps") `gamma.W` The log odds ratios of effect of the true causal SNPs (not including gamma0, the intercept term) `freq` Haplotype frequencies as a data.frame, with column Probability indicating relative frequency in controls. `GenoProbList` An list of objects giving the probability of seeing each X,W genotype vector. This can be calculated within the function if no value supplied, or you can pass a pre-calculated version

## Details

Assumes we have a list, GenoProbList, giving the GenoProb values for each X.

## Value

The expected variance of beta for each SNP X, assuming the causal SNPs are W

## Author(s)

Mary Fortune and Chris Wallace

## Examples

 ```1 2 3 4``` ```freq=fake_freq(nhaps=100,nsnps=5) # fake haplotype frequency data EVB=expected_vbeta(N0=1000,N1=2000,snps=paste0("s",1:5), W="s1",gamma.W=log(1.5),freq=freq) EVB # causal variant is SNP 1, with OR 1.5 ```

simGWAS documentation built on Aug. 22, 2019, 9:03 a.m.