davidaknowles / suez

R package for mapping response-expression QTLs
Apache License 2.0
4 stars 2 forks source link

Add known Covariates #2

Open ivlachos opened 6 years ago

ivlachos commented 6 years ago

Hi David,

I'm testing suez and I've created the covariance matrix using the condition and latent variables.

Is there a way to add known covariates? (e.g. genotype PCs, Sex, etc) and interaction terms?

Thank you

davidaknowles commented 6 years ago

This isn't currently supported but shouldn't be hard to add - the math/stan models don't change, just the R wrappers. The question is whether you would want to include these terms as fixed or random effects? I guess ideally we'd have the option to do either.

ivlachos commented 6 years ago

Hi David,

Sounds great! At least fixed effects but both would be also useful.

Thank you for the lightning-fast response!

davidaknowles commented 6 years ago

Counterintuitively I think random effects would actually be easier here, because the covariance learning code is pretty generic. The fixed effect fitting tries to be smart about initializing each model from its nested submodel which makes things somewhat more complicated. I'll have a go at the RE first when I get the chance.