An introduction to the statistics behind the most popular genomic data science projects. This is the sixth course in the Genomic Big Data Science Specialization from Johns Hopkins University.

Loading...

From the course by Johns Hopkins University

Statistics for Genomic Data Science

115 ratings

An introduction to the statistics behind the most popular genomic data science projects. This is the sixth course in the Genomic Big Data Science Specialization from Johns Hopkins University.

From the lesson

Module 2

This week we will cover preprocessing, linear modeling, and batch effects.

- Jeff Leek, PhDAssociate Professor, Biostatistics

Bloomberg School of Public Health

In previous lectures, we've talked about a linear regression model that relates one

Â outcome to one covariate.

Â But in general in a genomic study, you might have measured many covariates.

Â Say, technological covariates like the batch effects or biological variables such

Â as the demographics of the samples that you collected.

Â And you might want to adjust for those in your linear regression model.

Â So we're going to talk a little bit about how to do that with a very simple example

Â from the Millennium Development Project.

Â Here we're going to be plotting the percent of children that are hungry.

Â That's what's going to happen on the y-axis here,

Â this is the percent of children that are hungry, versus year on the x-axis.

Â So what we're going to do is we're going to fit our standard

Â linear regression model here.

Â So here we're relating the percent that are hungry to a linear function

Â of the year plus an e term that represents all of the measurement error and

Â all of the variability that we got from sampling.

Â So one way that we can try to model some of that error that we didn't include in

Â this initial regression model is to color the samples by whether they're

Â a male or a female.

Â So here I've colored the males by red and the females by black.

Â And so what we can do is fit a new regression model.

Â And this new regression model says the percent that are hungry is a linear

Â regression on the year plus a term for whether you're female or male.

Â F is equal to one if you're a female and zero if you're a male,

Â like we saw with the categorical covariates, plus

Â an error term that represents everything that we didn't model using this model.

Â So here one thing to note is that if the F term is equal to zero,

Â then this term cancels out, the b2F term cancels out and

Â you're left with this linear regression model.

Â Similarly if this F term is equal to one then you still have

Â a new constant here which can be put into the intercept term and

Â you still have the same regression model that you're trying to fit here.

Â So you end up with two regression lines that are parallel to each other when you

Â fit this sort of regression model.

Â So now how do we interpret these different coefficients?

Â So b0 is the percent that are hungry at year zero for males.

Â Because the F variable is equal to 0 and the y variable is equal to 0.

Â b0 plus b2 is the percent hungry at year zero for

Â the females because now the F variable is equals to 1.

Â And b1 is the change per year in the percent that are hungry.

Â So for a one unit changing year,

Â what's the one unit change in the percent that are hungry?

Â And ei again is everything that we didn't measure.

Â Ideally, it will have a variability distribution that we can model carefully.

Â So this is the way that you often fit these regression models.

Â So you have to be a little careful about how you interpret the coefficients once

Â you've fit adjustment variables especially if you're adjusting for many variables.

Â The other thing we saw is that there you were fitting parallel lines, but

Â sometimes you want to fit not just parallel lines.

Â So the way that you do that is with interaction terms.

Â So here I'm going to switch to a different example, so

Â here it's expression plotted on the y-axis and genotype plotted on the x-axis.

Â And so here are the different genotypes that you could have.

Â You could have a homozygous minor allele,

Â heterozygous where the minor allele copy comes from one sample, heterozygous

Â where the minor allele copy comes from the other example, or homozygous major allele.

Â And here you can see, if you fit a linear regression model,

Â it might fit pretty well.

Â And if you fit adjustment variable it might not necessarily work.

Â Because you again,

Â would get two parallel lines which don't necessarily fit this data very well.

Â But what you can do is you can include a term where you multiply the indicator

Â variables for the RM effect and the BY effect and

Â then you could get different levels of the means for each of the different values.

Â So this is fitting an interaction model.

Â These things can get very tricky especially when you're dealing with

Â continuous covariates, particularly the interpretation

Â of what the parameters mean for each of these values.

Â And so if you're fitting these more complicated regression models

Â it's worth taking a long time to think about

Â exactly what does each of the beta coefficients mean?

Â Again linear models is a whole class and

Â adjustment variables are a whole huge subset of that class.

Â So I'd encourage you if you're interested in this and you have to fit very

Â complicated linear regression models to take a linear regression modeling course.

Â The basic thing to keep in mind here is how many levels do you want to fit?

Â What makes sense biologically?

Â How do you want to relate?

Â How many covariates do you want to basically include in your model and

Â adjust for?

Â And there are great additional notes again in this Statistics for

Â the Life Sciences class.

Â Coursera provides universal access to the worldâ€™s best education,
partnering with top universities and organizations to offer courses online.