recessive.ll.linear: Function to Calculate Recessive Log Likelihood for a Linear...

Description Usage Arguments Value Examples

View source: R/likelihood_calc_function.R

Description

Calculates the log likelihood for a given set of linear regression coefficients under a recessive genetic model.

Usage

1
recessive.ll.linear(beta, m, es, sd_y_x_model, sd_y_x_truth)

Arguments

beta

Vector of linear regression coefficients.

m

Minor allele frequency.

es

Vector of effect sizes with two elements, (mean AB - mean AA) and (mean BB - mean AA).

sd_y_x_model

The standard deviation of Y (the outcome) given X (predictors/genotype) under the test model.

sd_y_x_truth

The standard deviation of Y given X (predictors/genotype) given genotype under the true model.

Value

The log likelihood.

Examples

1
2
recessive.ll.linear(beta = c(0, 3), m = 0.1, es = c(0,3), 
 sd_y_x_model = 0.9544108, sd_y_x_truth = 0.9544108)

genpwr documentation built on March 31, 2021, 1:06 a.m.