Package: genpwr 1.0.4

Camille Moore

genpwr: Power Calculations Under Genetic Model Misspecification

Power and sample size calculations for genetic association studies allowing for misspecification of the model of genetic susceptibility. "Hum Hered. 2019;84(6):256-271.<doi:10.1159/000508558>. Epub 2020 Jul 28." Power and/or sample size can be calculated for logistic (case/control study design) and linear (continuous phenotype) regression models, using additive, dominant, recessive or degree of freedom coding of the genetic covariate while assuming a true dominant, recessive or additive genetic effect. In addition, power and sample size calculations can be performed for gene by environment interactions. These methods are extensions of Gauderman (2002) <doi:10.1093/aje/155.5.478> and Gauderman (2002) <doi:10.1002/sim.973> and are described in: Moore CM, Jacobson S, Fingerlin TE. Power and Sample Size Calculations for Genetic Association Studies in the Presence of Genetic Model Misspecification. American Society of Human Genetics. October 2018, San Diego.

Authors:Camille Moore [aut, cre], Sean Jacobson [aut]

genpwr_1.0.4.tar.gz
genpwr_1.0.4.tar.gz(r-4.5-noble)genpwr_1.0.4.tar.gz(r-4.4-noble)
genpwr_1.0.4.tgz(r-4.4-emscripten)genpwr_1.0.4.tgz(r-4.3-emscripten)
genpwr.pdf |genpwr.html
genpwr/json (API)

# Install 'genpwr' in R:
install.packages('genpwr', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

3.92 score 1 stars 42 scripts 242 downloads 4 mentions 68 exports 29 dependencies

Last updated 4 years agofrom:51c256c4ce. Checks:OK: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKDec 16 2024
R-4.5-linuxOKDec 16 2024

Exports:add.fun.tadd.or.functionadditive.lladditive.ll.linearas.numeric2calc.likecalc.like.linearcalc.like.linear.log.envir.interactiondf2.lldf2.ll.lineardom.fun.tdom.or.functiondominant.lldominant.ll.lineares.calc.linearexpected.linear.llexpected.linear.ll.lin.envfind.prob.domfind.prob.recgenpwr.calcintegrand_funct_caseintegrand_funct_controllinear.mleslinear.mles.lin.envir.interactionlinear.mles.lin.envir.interaction_reducedlinear.mles.log.envir.interactionlinear.outcome.lin.envir.interaction.sdslinear.outcome.lin.envir.interaction.sds_reducedlinear.outcome.log.envir.interaction.sdslinear.sdsll_zero_finder2ll.ge.logisticll.ge.logistic.lin.envirll.linear.selectorlogistic.mleslogitncp.searchnull.llnull.ll.linearodds_ratio_functionor_calcor.function.2dfor.plotp_vec_returnerp_vec_returner_lin_envpower_envir.calcpower_envir.calc.linear_outcomepower_linear_envir.calc.linear_outcomepower_linear_envir.calc.logistic_outcomepower.calcpower.calc.linearpower.plotquad_rootsrec.fun.trec.or.functionrecessive.llrecessive.ll.linearsolve_ass_envir.calcss_envir.calc.linear_outcomess_linear_envir.calc.linear_outcomess_linear_envir.calc.logistic_outcomess.calcss.calc.linearss.plotX_mat_returnerX_mat_returner_llezero_finder_nleqslv

Dependencies:clicolorspacefansifarverggplot2gluegtableisobandlabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnleqslvnlmepillarpkgconfigR6RColorBrewerrlangscalestibbleutf8vctrsviridisLitewithr

Introduction to genpwr

Rendered fromvignette.Rmdusingknitr::rmarkdownon Dec 16 2024.

Last update: 2019-04-04
Started: 2019-04-04

Readme and manuals

Help Manual

Help pageTopics
Function to Calculate t matrix for logistic outcome with binary environment interaction in additive modeladd.fun.t
Additive Model Functionadd.or.function
Function to Calculate Additive Log Likelihood for a Logistic Regression Modeladditive.ll
Function to Calculate Additive Log Likelihood for a Linear Regression Modeladditive.ll.linear
Function to convert to numeric with scientific notation containing the "." characteras.numeric2
Function to Calculate Log Likelihood for a Logistic Regression Modelcalc.like
Function to Calculate Log Likelihood for a Linear Regression Modelcalc.like.linear
Function to calculate the standard deviation of y given x for linear models with logistic environment interactioncalc.like.linear.log.envir.interaction
Function to Calculate 2df Log Likelihood for a Logistic Regression Modeldf2.ll
Function to Calculate 2 Degree of Freedom Log Likelihood for a Linear Regression Modeldf2.ll.linear
Function to Calculate t matrix for logistic outcome with binary environment interaction in dominant modeldom.fun.t
Dominant Model Functiondom.or.function
Function to Calculate Dominant Log Likelihood for a Logistic Regression Modeldominant.ll
Function to Calculate Dominant Log Likelihood for a Linear Regression Modeldominant.ll.linear
Function to Calculate Effect Size for Linear Modelses.calc.linear
Function to Calculate Expected Log Likelihood for a Single Genotypeexpected.linear.ll
Function to Calculate Expected Log Likelihood for a Single Genotype with linear environment interactionexpected.linear.ll.lin.env
Dominant probability finding functionfind.prob.dom
Recessive probability finding functionfind.prob.rec
Function to Calculate Power for Linear Models with logistic environment interactiongenpwr.calc
Function to generate integrand for mle for casesintegrand_funct_case
Function to generate integrand for mle for controlsintegrand_funct_control
Function to calculate MLE's for linear modelslinear.mles
Function to calculate the standard deviation of y given x for linear models with linear environment interactionlinear.mles.lin.envir.interaction
Function to calculate the standard deviation of y given x for linear models with linear environment interaction for the reduced model without GxE interactionlinear.mles.lin.envir.interaction_reduced
Function to calculate the standard deviation of y given x for linear models with logistic environment interactionlinear.mles.log.envir.interaction
Function to calculate the standard deviation of y given x for linear models with linear environment interactionlinear.outcome.lin.envir.interaction.sds
Function to calculate the standard deviation of y given x for linear models with linear environment interactionlinear.outcome.lin.envir.interaction.sds_reduced
Function to calculate the standard deviation of y given x for linear models with logistic environment interactionlinear.outcome.log.envir.interaction.sds
Functions to Calculate Residual SD for Normal/Continuous Outcomes Function to calculate the standard deviation of y given x for linear modelslinear.sds
Zero finding functionll_zero_finder2
Function to calculate MLE's for logistic models with logistic environment interactionll.ge.logistic
Function to output log likelihood for logistic outcome with linear environment variablesll.ge.logistic.lin.envir
Function to return log likelihood function for specified model typell.linear.selector
Function to calculate MLE's for logistic modelslogistic.mles
Logit Functionlogit
Function to Determine Non-Centrality Parameter of the Chi-squared distributionncp.search
Function to Calculate Null Log Likelihood for a Logistic Regression Modelnull.ll
Function to Calculate Expected Null Log Likelihood for a Linear Regression Modelnull.ll.linear
Odds Ratio Functionodds_ratio_function
Odds ratio calculationor_calc
2df Model Functionor.function.2df
Function to Plot Odds Ratio Resultsor.plot
Function to output probability vector used in calculation of MLE's for linear outcome with logistic environment interactionp_vec_returner
Function to output probability vector used in calculation of MLE's for linear outcome with linear environment interactionp_vec_returner_lin_env
Function to Calculate Power for Logistic Models with Environment Interactionpower_envir.calc
Function to Calculate Power for Linear Models with logistic environment interactionpower_envir.calc.linear_outcome
Function to Calculate Power for Linear Models with linear environment interactionpower_linear_envir.calc.linear_outcome
Function to Calculate Power for Linear Models with logistic environment interactionpower_linear_envir.calc.logistic_outcome
Function to Calculate Powerpower.calc
Function to Calculate Power for Linear Modelspower.calc.linear
Function to Plot Power Resultspower.plot
Function to Solve Quadratic Equationsquad_roots
Function to Calculate t matrix for logistic outcome with binary environment interaction in recessive modelrec.fun.t
Recessive Model Functionrec.or.function
Function to Calculate Recessive Log Likelihood for a Logistic Regression Modelrecessive.ll
Function to Calculate Recessive Log Likelihood for a Linear Regression Modelrecessive.ll.linear
Binomial coefficient calculationsolve_a
Function to Calculate Power for Logistic Models with Environment Interactionss_envir.calc
Function to Calculate Power for Linear Models with logistic environment interactionss_envir.calc.linear_outcome
Function to Calculate Power for Linear Models with linear environment interactionss_linear_envir.calc.linear_outcome
Function to Calculate Sample Size for Linear Models with logistic environment interactionss_linear_envir.calc.logistic_outcome
Function to Calculate Sample Sizess.calc
Function to Calculate Sample Size in Linear Modelsss.calc.linear
Function to Plot Sample Size Resultsss.plot
Function to output X matrices used in calculation of MLE's for linear outcome with logistic environment interactionX_mat_returner
Function to output X matrices used in calculation of MLE's for linear outcome with linear environment interactionX_mat_returner_lle
Zero finderzero_finder_nleqslv