perm.strata vs addcovar in scanoneperm

22 views
Skip to first unread message

Ellen Risemberg

unread,
Oct 31, 2022, 5:23:52 PM10/31/22
to R/qtl discussion
Hi Karl, 

I have ~400 F2 mice which were infected with multiple viruses in multiple batches. So while doing permutation testing I'd like to permute the phenotypes within each batch and infection group. 

I originally coded this up by creating a variable with a unique value for each batch/infection combination to pass into perm.strata. I'm now wondering if the addcovar argument would work as well. If I passed addcovar = infection/batch and n.perm=1000 into scanone (without perm.strata specified), would it permute the phenotypes within the stratifications defined by the covariates? 

Sorry if this was already answered elsewhere. 

Ellen

Karl Broman

unread,
Nov 1, 2022, 10:16:39 AM11/1/22
to R/qtl discussion
The rows of the covariates are kept aligned with the rows of the phenotypes, and it's the rows of the genotypes that get permuted. So if there is no association between genotype and infection/batch, it would be fine to leave perm.strata unspecified and do an unstratified permutation test; the batch effects in the phenotypes will be retained. But if there aren't too many batches, there should be no harm in stratifying on batch in the permutations.

karl

Ellen Risemberg

unread,
Nov 8, 2022, 10:05:35 AM11/8/22
to R/qtl discussion

This makes sense, thanks! 
Reply all
Reply to author
Forward
0 new messages