From cd086f7eaa3271f18317eb34b37561b4d1b929b1 Mon Sep 17 00:00:00 2001 From: Peter Carbonetto Date: Thu, 7 Nov 2024 09:44:42 -0600 Subject: [PATCH] Update pkgdown function reference. --- docs/reference/cov_canonical.html | 22 +-- docs/reference/cov_ed.html | 38 ++--- docs/reference/expand_cov.html | 11 +- docs/reference/extreme_deconvolution.html | 156 +++++++++--------- docs/reference/get_estimated_pi.html | 24 +-- .../get_posterior_condition_wise_summary.html | 136 +++++++++++++++ docs/reference/index.html | 6 +- 7 files changed, 247 insertions(+), 146 deletions(-) create mode 100644 docs/reference/get_posterior_condition_wise_summary.html diff --git a/docs/reference/cov_canonical.html b/docs/reference/cov_canonical.html index fba4d5c..1a2dacc 100644 --- a/docs/reference/cov_canonical.html +++ b/docs/reference/cov_canonical.html @@ -17,7 +17,7 @@ mashr - 0.2.73 + 0.2.81 @@ -56,10 +56,10 @@

Compute a list of canonical covariance matrices

-
cov_canonical(
-  data,
-  cov_methods = c("identity", "singletons", "equal_effects", "simple_het")
-)
+
cov_canonical(
+  data,
+  cov_methods = c("identity", "singletons", "equal_effects", "simple_het")
+)
@@ -72,7 +72,7 @@

Arguments

a vector of strings indicating the matrices to be used: "identity" for the identity (effects are independent among conditions); "singletons" for the set of matrices with just one -non-zero entry x_jj = 1 (j=1,...,R); (effect specific to +non-zero entry \(x_{jj} = 1, j = 1,...,R\); (effect specific to condition j); "equal_effects" for the matrix of all 1s (effects are equal among conditions); "simple_het" for a set of matrices with 1s on the diagonal and all off-diagonal elements equal to 0.25, 0.5 or @@ -94,8 +94,8 @@

Details

Examples

-
data = mash_set_data(Bhat = cbind(c(1,2),c(3,4)), Shat = cbind(c(1,1),c(1,1)))
- cov_canonical(data)
+    
data = mash_set_data(Bhat = cbind(c(1,2),c(3,4)), Shat = cbind(c(1,1),c(1,1)))
+ cov_canonical(data)
 #> $identity
 #>      [,1] [,2]
 #> [1,]    1    0
@@ -131,7 +131,7 @@ 

Examples

#> [1,] 1.00 0.75 #> [2,] 0.75 1.00 #> - cov_canonical(data,"singletons") + cov_canonical(data,"singletons") #> $singletons_1 #> [,1] [,2] #> [1,] 1 0 @@ -142,7 +142,7 @@

Examples

#> [1,] 0 0 #> [2,] 0 1 #> - cov_canonical(data,c("id","sing")) # can use partial matching of names + cov_canonical(data,c("id","sing")) # can use partial matching of names #> $identity #> [,1] [,2] #> [1,] 1 0 @@ -158,7 +158,7 @@

Examples

#> [1,] 0 0 #> [2,] 0 1 #> - +
diff --git a/docs/reference/cov_ed.html b/docs/reference/cov_ed.html index 8357b1e..4ec2f79 100644 --- a/docs/reference/cov_ed.html +++ b/docs/reference/cov_ed.html @@ -19,7 +19,7 @@ mashr - 0.2.73 + 0.2.81
@@ -60,7 +60,7 @@

Perform "extreme deconvolution" (Bovy et al) on a subset of
-
cov_ed(data, Ulist_init, subset = NULL, algorithm = c("bovy", "teem"), ...)
+
cov_ed(data, Ulist_init, subset = NULL, algorithm = c("bovy", "teem"), ...)
@@ -99,32 +99,14 @@

Details

Examples

-
data = mash_set_data(Bhat = cbind(c(1,2),c(3,4)), Shat = cbind(c(1,1),c(1,1)))
-U_pca = cov_pca(data,2)
-U_x = apply(data$Bhat, 2, function(x) x - mean(x))
-U_xx = t(U_x) %*% U_x / nrow(U_x)
-cov_ed(data,c(U_pca, list(xx = U_xx)))
-#> $ED_PCA_1
-#>          [,1]      [,2]
-#> [1,] 2.987439  5.154809
-#> [2,] 5.154809 12.359820
-#> 
-#> $ED_PCA_2
-#>             [,1]        [,2]
-#> [1,]  0.71223188 -0.00226719
-#> [2,] -0.00226719  0.70810972
-#> 
-#> $ED_tPCA
-#>          [,1]      [,2]
-#> [1,] 2.989069  5.154337
-#> [2,] 5.154337 12.359898
-#> 
-#> $ED_xx
-#>          [,1]     [,2]
-#> [1,] 6.611478 5.904371
-#> [2,] 5.904371 6.611478
-#> 
-
+    
if (FALSE) {
+data = mash_set_data(Bhat = cbind(c(1,2),c(3,4)), Shat = cbind(c(1,1),c(1,1)))
+U_pca = cov_pca(data,2)
+U_x = apply(data$Bhat, 2, function(x) x - mean(x))
+U_xx = t(U_x) %*% U_x / nrow(U_x)
+cov_ed(data,c(U_pca, list(xx = U_xx)))
+}
+
 
diff --git a/docs/reference/expand_cov.html b/docs/reference/expand_cov.html index 3f461e5..7a08ec3 100644 --- a/docs/reference/expand_cov.html +++ b/docs/reference/expand_cov.html @@ -1,7 +1,5 @@ -Create expanded list of covariance matrices expanded by - grid, Sigma_lk = omega_l U_k — expand_cov • mashrCreate expanded list of covariance matrices expanded by grid — expand_cov • mashrCondition-wise Posterior Summary — get_posterior_condition_wise_summary • mashr + + +
+
+ + + +
+
+ + +
+

Provide condition-wise summary based on posterior + distributions for each effect.

+
+ +
+
get_posterior_condition_wise_summary(mash_data, m, contrast_mat)
+
+ +
+

Arguments

+
mash_data
+

A mash data object, e.g. as created by mash_set_data

+ + +
m
+

A mash fit, typically an output from mash.

+ + +
contrast_mat
+

A matrix applied to mashr fitting result, +enabling comparisons for different conditions based on posteior +distributions.

+ +
+ + +
+

Examples

+

+# The following example performs pairwise comparisons in a data set
+# with 5 conditions: that is, it compares conditions (column) 1 and
+# 2, 1 and 3, 1 and 4, 1 and 5, 2 and 3, etc.
+library(Matrix)
+set.seed(1)
+simdata <- simple_sims(100,5,1)
+dat <- mash_set_data(simdata$Bhat,simdata$Shat)
+U <- cov_canonical(dat)
+m <- mash(dat,U)
+#>  - Computing 400 x 151 likelihood matrix.
+#>  - Likelihood calculations took 0.03 seconds.
+#>  - Fitting model with 151 mixture components.
+#>  - Model fitting took 0.26 seconds.
+#>  - Computing posterior matrices.
+#>  - Computation allocated took 0.00 seconds.
+x <- combn(5,2)
+n <- ncol(x)
+contrast_mat <- as.matrix(sparseMatrix(i = rep(1:n,each = 2),
+                                       j = as.vector(x),
+                                       x = 1,dims = c(n,5)))
+res <- get_posterior_condition_wise_summary(dat,m,contrast_mat)
+
+
+
+ +
+ + +
+ +
+

Site built with pkgdown 2.0.7.

+
+ +
+ + + + + + + + diff --git a/docs/reference/index.html b/docs/reference/index.html index 80d15f5..8ac6aa0 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,7 +17,7 @@ mashr - 0.2.73 + 0.2.81
@@ -113,6 +113,10 @@

All functions

Compute the proportion of (significant) signals shared by magnitude in each pair of conditions

+ +

get_posterior_condition_wise_summary()

+ +

Condition-wise Posterior Summary

get_samples()