Question: Compare samples that don't have a coefficient on the design matrix
gravatar for Lluís R.
5 days ago by
Lluís R.880
Spain, Barcelona
Lluís R.880 wrote:

I have some data that I model with 4 factors, each one have two levels. However, I need to compare some samples based on a fifth factor that is not included on the model:

Here I provide an example design matrix:

groups <- paste(c("f1A", "f1B", "f1A", "f1A", "f1B", "f1A"),  
               c("f2B", "f2B", "f2A", "f2A", "f2B", "f2B"),  
               c("f3A", "f3A", "f3B", "f3B", "f3A", "f3A"),  
               c("f4A", "f4B", "f4A", "f4B", "f4A", "f4B"), sep = "_")

m <- model.matrix(~ 0+groups, as.factor(groups))
colnames(m) <- levels(as.factor(groups))
f <- c("H", "G", "H", "G", "H", "G")

Here I want to compare F and G but they are not on the model (m). Assuming that I cannot make them with the coefficients present on the design, how can I compare them? Do I need to build another design matrix?

linar-model R comparisons • 42 views
ADD COMMENTlink written 5 days ago by Lluís R.880
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 902 users visited in the last hour