stephenslab / udr

R package implementing empirical Bayes methods for multivariate normal means.
https://stephenslab.github.io/udr
Other
7 stars 1 forks source link

Vignette notation discrepancy #19

Open yunqiyang0215 opened 1 year ago

yunqiyang0215 commented 1 year ago

ud_init() takes dat as input, and dat can either from mash_set_data() or X. But X is not mentioned before using it. Same problem occurs in

U_scaled = list(indep = diag(ncol(X)), equal = matrix(1, ncol(X), ncol(X)) + 0.0001 *
    diag(ncol(X)))

See here: https://stephenslab.github.io/udr/reference/ud_init.html

pcarbo commented 1 year ago

@yunqiyang0215 Can you please test the new version of ud_init with a data matrix and a mash data object to make sure it works with both those data types?

yunqiyang0215 commented 1 year ago

Hi @pcarbo , I just tested the implementation and it works. But I think the documentation about the function ud_init() also needs to be updated.

pcarbo commented 1 year ago

Better now?

yunqiyang0215 commented 1 year ago

Yes. A minor point, for the explanation of dat.

An n x m data matrix, in which each row of the matrix is an m-dimensional data point, or a “mash” object, for example created by [mash_set_data](https://rdrr.io/pkg/mashr/man/mash_set_data.html). When X is a matrix it should have at least 2 rows and at least 2 columns.

We should also replace X with dat?

pcarbo commented 1 year ago

Yes, good catch. This should now be fixed. I didn't update the pkgdown webpage with the change, but I'm sure we will have another opportunity to do so soon.

yunqiyang0215 commented 1 year ago

I see. Sounds good. Thanks, Peter!