You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: R/Power_LS.R
+6-5Lines changed: 6 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
#' Power_LS
2
2
#' @description The function is designed for calculating the power of heritability estimation from ACE models given the parameter settings. Or calculate one of the parameter settings (N,R,h2,c2) given the rest of known parameters.
3
-
#' This power calculator is made based on the Least Squares theory and follows the mathematical derivation proposed by Visscher(2004).
3
+
#' This power calculator is made based on the Least Squares theory and follows the mathematical derivation proposed by Visscher(2004).
4
4
#' @import stats
5
5
#' @param N1 The number of kin pairs for group1 (amount of PAIRS)
6
6
#' @param N2 The number of kin pairs for group2
@@ -11,13 +11,14 @@
11
11
#' @param R1 The genetic relatedness of kin pair group1
12
12
#' @param R2 The genetic relatedness of kin pair group2
13
13
#' @param alpha The type-one error rate for heritability estimation.
14
+
#' @param digits The number of digits to round the results. Default is 0.
14
15
#' @return A numeric \code{vector} of power when `N1` and `N2` are both specified.
15
16
#' \cr
16
17
#' A numeric \code{vector} of `N1` (or `N2`) when `N2` (or `N1`) is specified. A numeric \code{vector} of `N1` and `N2` when `RatioN` is specified.
Copy file name to clipboardExpand all lines: R/kinsim_single.R
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
#' @description The function to generate one group of univariate kin pair (e.g., only DZ twins) data using a multivariate norm approach, given the ACE components.
3
3
#' @param name Assigned name for the simulated group of kin pairs
4
4
#' @param Rel Genetic relatedness of the simulated kin pairs
5
-
#' @param r_c Assumed common enviroment correlation
5
+
#' @param r_c Assumed common environment correlation
6
6
#' @param n The number of generated kin pairs.(n PAIRS of data; The total number of participants is 2n)
7
7
#' @param mu The mean for generated variable
8
8
#' @param ace Vector of variance components under an ACE (additive genetics, common environment, unique environment) structure
0 commit comments