So the x is going to be the kind of matrix of predictors and y is going to

be the vector of responses so p is the

number of columns that is going to be p predictors.

Uh,I think it doesn't really make sense to look

at the top ten predictors if there aren't at

least ten predictors, so we're going to say, we're going to

check to see if p is at least ten.

And if it's not we'll just stop.

>> [SOUND] So the way this model works is basically, for each predictor

in your kind of matrix of predictors, we fit a, a univariate

regression model of the, of the response on each individual predictor.

And then for each individual predictors, so there is going to be

all these regression models that we fit and for each predictor,

there is going to be a p value associated with that,

that given predictor, you know, depending on how strong the association is.

So, so for every predictor we're going to have a p value, and then

what we're going to do is we're going to sort the p values from kind of

smallest to largest and then we'll take the top ten smallest in this

case p values, which indicate kind of

the, the predictors of the strongest associations.

So we'll take those top ten predictors,

and then we'll fit a separate regression model

with those ten predictors in it and that

will be kind of the final prediction model.

>> Alright so we're, first, so we've already

checked to see if there's at least ten predictors.

And we'll initialize our vector of p values here.

This is going to be an empty vector of zeros.

And the original loop through each of the predictors