Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More usage info on maltipoo() #1

Open
danfulop opened this issue Sep 24, 2020 · 13 comments
Open

More usage info on maltipoo() #1

danfulop opened this issue Sep 24, 2020 · 13 comments

Comments

@danfulop
Copy link

Thanks for the amazing compositional package! I'm starting to check it out. Writing with a small feature request to post a bit more usage-related information on the maltipoo() function, particularly in terms of specifying variance components. A vignette would be awesome, though example code in the function's help page could suffice. I'd be happy to help knit a vignette.

@jsilve24
Copy link
Owner

jsilve24 commented Sep 24, 2020 via email

@danfulop
Copy link
Author

Presently I just need to accommodate a single variance component for a simple repeated measures experiment, but do have uses for more complex (eg nested) hierarchical structure. As for the vignette I'd need to find 1 or 2 suitable public datasets to illustrate different variance component setups. Perhaps you know of such datasets already?

@danfulop
Copy link
Author

The data in https://www.frontiersin.org/articles/10.3389/fpls.2020.00599/full
may be good for a vignette.

@danfulop
Copy link
Author

What I am unsure of is how to specify U in fido::maltipoo()

@jsilve24
Copy link
Owner

jsilve24 commented Sep 25, 2020 via email

@danfulop
Copy link
Author

danfulop commented Sep 25, 2020

If I have a variance component whereby samples covary due to originating from the same (multiply measured) biological replicate and have 3 biological replicates overall, how should U_1 be structured?

Would this do to specify U_1?
model.matrix(~ 0 + biological_rep, data=dat)

...it seems like perhaps not given that the dimensions are not NxN, but rather N x number of biological replicates.

@jsilve24
Copy link
Owner

jsilve24 commented Sep 25, 2020 via email

@danfulop
Copy link
Author

Gotcha. That makes perfect sense. Thanks!

@danfulop
Copy link
Author

danfulop commented Sep 26, 2020

I'm getting a dimensions mismatch error when I input U as discussed:

> fido::maltipoo(Y = Y,
+                X = X,
+                upsilon = upsilon,
+                Theta = Theta,
+                U = U_1,
+                Xi = Xi)
Error in try_set_dims(c(nrow(X), ncol(Theta), ncol(U), args[["Q"]])) : 
  Dimension missmatch in arguments: [4,4,108]

U has 108 columns i.e. equal to the number of samples N as discussed. I setup the rest of the function's inputs as in the fido::pibble() vignette, but for my data and design matrix.

What am I missing?

@jsilve24
Copy link
Owner

jsilve24 commented Oct 1, 2020

Very sorry for the delay.

Have you checked the dimensions of the other parts? e.g., are you sure that

nrow(X) == ncol(Theta) == ncol(U)?

Justin

@jsilve24
Copy link
Owner

jsilve24 commented Oct 1, 2020

Oh shit! I said the wrong thing, U has dimension Q x Q - number of covariates (its just for many of these models Q == N).

My apologies!

Same as before (Row stacking of U's but each U_i is QxQ).

@danfulop
Copy link
Author

Thanks! The fido::maltipoo documentation refers to QxQ as well. However, I'm now again unsure of how to construct U_i. What do the rows and columns of the U_i matrices represent? The covariates?

@jsilve24
Copy link
Owner

jsilve24 commented Oct 16, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants