Question: paired sample - SVA model matrix
0
gravatar for flippy23
4 months ago by
flippy230
flippy230 wrote:

Hello,

 

I am running SVA and had a question regarding the null and full model matrices. I am comparing a before/after effect of a treatment within each patient. How do I account for this in building the model matrices? How do I specify to SVA that the before/after variable is within the same patient? 

 

thanks

limma sva paired sample • 134 views
ADD COMMENTlink modified 4 months ago by James W. MacDonald49k • written 4 months ago by flippy230
Answer: paired sample - SVA model matrix
0
gravatar for James W. MacDonald
4 months ago by
United States
James W. MacDonald49k wrote:

You can find an example of a paired analysis in the limma User's Guide, section 9.4.1

For sva you will want to define both the full and reduced model by hand though, as the default reduced model has only an intercept, which isn't the right reduced model for your situation.

ADD COMMENTlink written 4 months ago by James W. MacDonald49k

So...just to make sure I understand.

null model (only adjustment covariates) would consist of: covariate 1 + covariate 2 + covariate 3 

full model: ~Study_ID+Treatment + covariate 1 + covariate 2 + covariate 3 

 

how will it differentiate the treatment effect from the other covariates? 

 

ADD REPLYlink written 4 months ago by flippy230

It doesn't. A statistician would call the three covariates 'nuisance variables', which are things that you think (know) will have an effect on at least some of the genes, and so you need to account for them in your model.

In your case you said you have paired samples. So if one patient has a much higher level of expression for a given gene than the other patients, you don't necessarily care about that fact. Instead, you want to know how much the treatment affects the gene expression after accounting for any patient-specific differences. And you account for any between-patient differences by adding a patient-level blocking factor to your model, which estimates the mean expression for that patient, and removes that patient-level expression, to give you a cleaner signal.

Put another way, this is just simple algebra. You are saying, that for Gene X, the expression for patient 1 is

Gene_X_expression = patient_effect + treatment_effect + covariate1_effect + covariate2_effect + covariate3_effect

Which is the same as saying that

treatment_effect = Gene_X_expression - patient_effect - covariate1_effect - covariate2_effect - covariate3_effect

So the treatment effect is estimated from the expression data, after subtracting out all these other things that might affect the gene expression, but are not of interest to you. It's a little more complicated than that, but that's the basic idea.

ADD REPLYlink written 4 months ago by James W. MacDonald49k

Or maybe you are asking a different question? You might be asking how does sva differentiate the treatment covariate from the others? Again, it doesn't.

The idea behind sva is to say that you might have other nuisance variables lurking in your data that you don't really know about. In which case you want to have the data after you have adjusted out all the known nuisance variables (your reduced model), as well as the data after you have adjusted out all the known nuisance variables plus the variable you care about. You then try to see if there are any extra patterns in the data (after adjusting for all the variables you know about) that you can include as extra nuisance variables, but with the caveat that you don't want to erase anything that might pertain to the treatment.

 

ADD REPLYlink written 4 months ago by James W. MacDonald49k

Got it. I just want to ensure that I'm accounting for blocking correctly in the full model. I wouldn't include study_id in the null model because differences between the patients isn't something I want to account. Likewise, wouldn't include treatment effect in the null model because that's what I'm trying to estimate and don't consider that a nuisance parameter. This I understand. I just want to make sure that the way I considered the blocking is correct. 

design <- model.matrix(~Block+Treatment)

this is from the LIMMA user guide. how would i add additional covariates, as i want to, in the full model for the design of the model matrix? 

ADD REPLYlink written 4 months ago by flippy230
Please log in to add an answer.

Help
Access

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