THANK YOU ALL FOR JOINING TODAY.
FOR THOSE WHO DON'T KNOW, I'M
GINA NORATO.
I'M THE LEAD OF THE OFFICE OF
BIOSTATISTICS FOR THE CLINICAL
TRIALS UNIT IN NIDS.
TODAY WE'RE GOING TO BE TALKING
ABOUT LINEAR REGRESSION AS PART
OF OUR SIX-PART STATISTICAL
LECTURE SERIES THIS SPRING.
PLEASE FEEL FREE, I'M OKAY IF
YOU WOULD LIKE TO SUBMIT
QUESTIONS WHILE I AM PRESENTING
VIA CHAT OR THE Q & A OPTION.
JUST KNOW THAT, THAT IT IS
LIKELY BEING RECORDED.
SO IF YOU WOULD RATHER NOT BE ON
RECORDING FOR THE FUTURE, JUST
KEEP THAT IN MIND, BUT I'M HAPPY
TO READ YOUR QUESTION AND ANSWER
AS WE GO.
OKAY.
SO, JUST TO GIVE A LITTLE
OUTLINE OF WHAT WE'RE GOING TO
TRY TO GET THROUGH TODAY: SO
FIRST I WANT TO GIVE AN OVERVIEW
OF WHAT REGRESSION IS AND WHY WE
USE IT.
AND THEN, I'M JUST GOING TO GET
INTO THE MEAT OF HOW WE RUN
THROUGH MODELING, THE DIFFERENT
ASSUMPTIONS THAT WE NEED TO
CONSIDER WHEN WE DEAL WITH
REGRESSION.
WHAT THE MODEL STRUCTURE LOOKS
LIKE.
HOW TO DEAL WITH THINGS LIKE
COVARIANTS AND CONFOUNDING IN
THE MODEL, AND ADD INTERACTIONS
TERMS AND THROUGHOUT WE WILL BE
TALKING ABOUT CHECKING MODEL
ASSUMPTIONS.
THEN, I WILL TALK ABOUT HOW TO
REPORT THE RESULTS OF THESE
REGRESSIONS GIVING SOME SAMPLE
LANGUAGE.
AND ALSO TALK ABOUT SOME OTHER
SIMILAR TESTS SUCH AS P-TESTS,
CORRELATIONS AND NOVA.
THINGS THAT ARE SORT OF IN LINE
WITH REGRESSION AND TALK ABOUT
WHEN WE WOULD USE ONE VERSUS THE
OTHER.
AND CONCLUDE WITH SUMMARY AND
KEY POINTS.
SO GETTING INTO THE OVERVIEW, SO
WHAT IS LINEAR REGRESSION?
SO REGRESSION IS BASICALLY JUST
A STATISTICAL MODEL THAT
ESTIMATES THE LINEAR
RELATIONSHIP BETWEEN ONE
CONTINUOUS VARIABLE AND ONE OR
MORE OTHER VARIABLES OF
INTEREST.
THEY MUST BE USED WITH
CONTINUOUSLY MEASURED OUTCOME
METRICS.
SO, SOMETHING WITH A SMOOTH
CONTINUOUS SCALE.
SOMETHING LIKE A MEASURE OF
WEIGHT OR TIME, VOLUME, BLOOD
PRESSURE, AND SOME LARGE-RANGE
FUNCTIONAL SCALES.
IMPORTANTLY, THEY SHOULD SORT OF
BEHAVE UNBOUNDED, EVEN IF THERE
IS A LOGICAL BOUND TO YOUR
MEASUREMENT, LIKE WE CAN'T HAVE
A NEGATIVE TIME, WE WANT TO MAKE
SURE THAT THE DISTRIBUTION OF
THEIR VALUES IS SUCH THAT WE'RE
NOT REALLY UP AGAINST THE
BOUNDARIES, WHO WE HAVE THE NICE
SMOOTH CONTINUOUS BEHAVE AND WE
HAVE NICE GRANULARITIES TO THE
MEASUREMENT AS WELL, IF WE'RE
DEALING WITH WHOLE NUMBERS OR
COUNT VALUES THAT WILL FALL
UNDER A DIFFERENT TYPE OF
REGRESSION.
SO JUST CONSIDER THAT AS WELL.
AND FOR REGRESSION WE ARE
PRIMARILY CONCERNED ABOUT
PREDICTING Y FROM X OR MULTIPLE
Xs AND MULTIPLE COVARIANTS.
I WANT TO BE CLEAR, WHEN WE SAY
PREDICTION HERE, WE'RE TALKING
ABOUT PURELY FROM A CALCULATING
OR STATISTICAL POINT OF VIEW.
WE DON'T REALLY MEAN TO HAVE ANY
CAUSAL PREDICTION OR CAUSAL
RELATIONSHIP HERE.
THAT SORT OF INVESTIGATION WOULD
BE UNDER A TOTALLY DIFFERENT
BRANCH OF STATISTICS.
SO WE'RE JUST TALKING ABOUT IF
WE KNOW SOME CHARACTERISTICS OF
A PERSON, HOW WELL CAN WE
PREDICT SOME OTHER VARIABLE THAT
WE HAVE OBSERVED ALSO.
SO THIS IS STILL PURELY FROM
KIND OF A CORRELATIONAL-TYPE OF
INTERPRETATION, NOT CAUSATION.
AND SO, JUST TO GO THROUGH SOME
TERMINOLOGY AND JUST HAVE TO A
BASIS OR A FRAMEWORK FROM WHERE
TO GO FROM HERE.
SO WE'RE GOING TO BE TALKING A
LOT ABOUT Xs AND Ys.
SO OUR Y IS GOING TO BE OUR
DEPENDENT VALUABLE.
WE IS ALSO CAUSE THIS OUR
RESPONSE VARIABLE OR OUTCOME
MEASURE OR VARIABLE.
AND OUR Xs ARE GOING TO BE OUR
INDEPENDENT VARIABLES.
THEY ARE ALSO CALLED EXPLANATORY
VARIABLES OR PREDICTOR
VARIABLES.
AND DEPENDING ON OUR SCIENTIFIC
VIEW OF THESE THINGS WE CAN ALSO
CALL THEM COVARIOUS OR
CONFOUNDERS.
THESE ARE MORE LIKE A
QUALITATIVE LABEL.
BUT THEY ARE ALL BASICALLY
TREATED THE SAME IN THE MODEL.
THE MODEL DOESN'T VIEW THEM ANY
DIFFERENTLY.
AND THEN, YOU'LL WANT TO PUT
YOUR PREALGEBRA OR ALGEBRA HATS
ON, BECAUSE WE ARE GOING TO BE
TALKING ABOUT LINES AND
GRAPHING.
SO WE'RE GOING TO BE TALKING
ABOUT INTERCEPTS WHERE THIS IS
REALLY A PREDICTION OF Y WHERE
ALL OTHER VARIABLES INVESTS ARE
ZERO.
THAT KIND OF ALGEBRAIC
INTERPRETATION OF INTERCEPT AND
SLOPE.
AND ALSO WE WILL BE TALKING
ABOUT COEFFICIENTS.
WE CAN THINK BROADLY OF THIS AS
BEING SLOPES, BUT I WANTED TO
CALL THIS A COEFFICIENT BECAUSE
IT IS KIND OF HOW THEY ARE
WRITTEN ABOUT IN THE OUTPUTS OF
REGRESSIONS AND THINGS LIKE
THAT, THEY ARE COEFFICIENTS.
SO, FOR CONTINUOUS MEASURE
VARIABLES OF X WE CAN THINK OF
THESE AS A SLOPE, WHEREAS THE
CHANGE IN THE PREDICTION OF Y
FOR ONE UNIT CHANGE IN X IS SORT
OF THE INTERPRETATION THERE.
BUT, YOU KNOW, FOR A BINARY OR
CATEGORICAL VARIABLE THIS ISN'T
REALLY A SLOPE, IT IS JUST A
SIMPLE CHANGE, BUT THE SAME SORT
OF LOGIC APPLIES.
THIS IS A CHANGE IN THE
PREDICTION OF Y BETWEEN TWO
DIFFERENT STEP LEVELS OF X.
AND WE CALL THOSE BROADLY JUST
COEFFICIENTS OR ESTIMATES EVEN
MORE BROADLY.
BUT IN TERMS OF WRITING OF A
REGRESSION EQUATION, WE CALL
THEM COEFFICIENTS.
SO JUST TO GIVE -- JUST TO KIND
OF GIVE OUR LITTLE OVERVIEW
HERE.
SO JUMPING RIGHT INTO SOME
ASSUMPTIONS FOR REGRESSION.
SO THERE ARE FOUR ASSUMPTIONS
THAT WE NEED TO BE CONSIDERING
WHEN WE DEAL WITH REGRESSION.
LINEARITY, INDEPENDENCE, NORMAL
DISTRIBUTION OF ERRORS AND EQUAL
VARIANCE OF ERRORS AND QUITE
NICELY, IF YOU WRITE THEM IN
THIS WAY, THEY HAVE THE LINE
ACRONYM TO MAKE THIS A LITTLE
BIT EASIER TO REMEMBER.
SO LET'S GO THROUGH EACH OF
THEM.
SO FOR LINEARITY, WE WANT TO
MAKE SURE THAT LINEAR MODEL TO
DESCRIBE THE RELATIONSHIP IS
EVEN APPROPRIATE AT ALL.
WE CAN DO THIS VERY SIMPLY IN
MOST CASES BY INVESTIGATING THE
BY VARIANT RELATIONSHIP OR THE
SET OF BIVARIANT RELATIONSHIPS
THAT WE'RE INTERESTED IN.
PERHAPS ANOTHER SORT OF MODEL IS
BEST FOR DESCRIBING THE
RELATIONSHIP.
A NONLINEAR, PERHAPS OR SOME
OTHER LINE MODEL OR
POLYNOMIAL-SORT OF REGRESSION
HERE WITH OTHER SORTS OF COMPLEX
TERMS.
NOT PURELY A LINEAR
RELATIONSHIP.
SO IT CAN BE REALLY IMPORTANT TO
VIEW AN INITIAL INVESTIGATION OF
WHAT YOU'RE DEALING TO MAKE SURE
THIS IS EVEN AN APPROPRIATE
DESCRIPTION OF YOUR DATA AT ALL.
NEXT WE ASSUME, WE NEED TO MAKE
SURE THAT OUR OBSERVATIONS FOR
OUR DATA ARE INDEPENDENT.
SO WE HAVE THIS INDEPENDENT
ASSUMPTION.
AND THIS CAN BE DETERMINED
WHETHER WE ARE ADHERING TO THIS
ASSUMPTION BY DIVINE OR
COLLECTION ALONE.
SO IS THERE CLUSTERING OF DATA
FROM PEOPLE COMING WITH FAMILIES
OR MAYBE WE HAVE THESE
INTERVENTIONAL UNITS, SCHOOLS
AND CLASSES IN SOME SETTINGS OR
WE HAVE PAIRED DATA OR REPEATED
MEASUREMENTS, CLUSTERING WITHIN
A PERSON OF REPEATED
MEASUREMENTS OVER TIME.
LONGITUDINAL DATA.
THIS WOULD ALL MEAN WE'RE NOT IN
A BASIC LINEAR REGRESSION
FRAMEWORK.
MAYBE WE NEED TO RUN A DIFFERENT
SORT OF MODEL TO ACCOUNT FOR
THIS CORRELATED BEHAVIOR WITHIN
THE CROSS OBSERVATIONS WITHIN
GROUPS.
WE ALSO NEED TO MAKE SURE THAT
WE'RE MEETING THE ASHUN OF
NORMAL DISTRIBUTION OF ERRORS.
SO, IMPORTANTLY, THIS IS THE
NORMAL DISTRIBUTION OF ERRORS.
AND NOT NECESSARILY THAT OUR
OUTCOME MEASURE IS NORMALLY
DISTRIBUTED.
SO THIS IS SPECIFICALLY ABOUT
WHEN YOU RUN YOUR MODEL AND
WE'RE GOING TO TALK ABOUT WHAT
ERRORS ARE IN A LITTLE BIT.
BUT WHEN YOU RUN YOUR MODEL AND
OBTAIN THE ERRORS FROM THE
MODAL, WHAT IS THE BEHAVIOR OF
THOSE, THE NEXT TWO MODELS ARE
RELATED TO SPECIFICALLY ERRORS
AND NOT ACTUALLY ANY OF THE
VARIABLES YOU'RE USING IN YOUR
REGRESSION.
WE CAN INVESTIGATE THE BEHAVIOR
OF THESE ERRORS EITHER USE THE
CLASSES LIKE A HISTOGRAM OR BY
DOING CUBE PLOTS WHICH IS
OBSERVING THE QUANTALS OF YOUR
ERRORS VERSUS THE THEORETICAL
NORMAL DISTRIBUTION QUANTILES.
WE SHOULD SEE NICE HISTOGRAM
BEHAVIOR AND/OR SIMILARLY, WE
SHOULD SEE SOMETHING ON THIS X
EQUAL Y LINE FOR A QQ PLOT.
I JUST WANT TO DEMONSTRATE, THIS
IS A SET OF PLOTS THAT ARE
RESAMPLED FROM A NEW UNDER LYING
NORMAL DISTRIBUTION.
YOU CAN SEE EVEN IN CASES WHERE
WE DO HAVE GOOD NORMAL
DISTRIBUTIONAL DATA OF THE
ERROR, THESE AREN'T GOING TO LIE
PERFECTLY, THEY WILL NEVER LIE
PERFECTLY ON THE X EQUALS Y
LINE.
PART OF WHAT WE WILL TALK ABOUT
MEETING ASSUMPTIONS IS
UNDERSTANDING YOU WILL NEVER
HAVE PERFECT BEHAVIOR IN THIS
WAY, WHEN YOU KNOW THE
UNDERLYING DISTRIBUTION IS
NORMAL, THE SAMPLE SIZE IS
SMALL, WE WILL NOT HAVE THIS
PERFECT X EQUAL Y LINE.
BUT WE SHOULD SEE IF THERE'S
ANYTHING REALLY MAJOR GOING ON
HERE WHEN WE DO THIS
INVESTIGATION.
AND THEN WE SHOULD ALSO
INVESTIGATE EQUAL VARIANCE OF
ERRORS.
SO, WE DO THIS BY LOOKING AT,
THERE ARE A COUPLE OF DIFFERENT
VERSIONS OF THIS TYPE OF PLOT,
BUT WE WILL MAINLY BE LOOKING AT
FITTED VALUES PREDICTED VALUES
OF OUR OUTCOME MEASURE AGAINST
OUR RECIPIENTS THAT WE ED MATE
FROM THE MODEL.
WE SHOULD SEE THAT THE SPREAD
AROUND THE VERTICAL SPREAD
AROUND THIS ZERO LINE IS EVEN
ACROSS ALL PREDICTED VALUES OF
Y.
AND WE CALL THIS -- HOME
SCUDASTICITY.
WE WANT TO SEE THIS ON THE LEFT
WITH RECTANGULAR BEHAVIOR.
AND FOR CERTAIN PREDICTED VALUES
OF Y WE HAVE LESS VARIABLE.
AND OTHER VALUES OF Y, MORE
VARIABLE, WHETHER WE HAVE THIS
SHAPE, OR OTHER TYPE OF CONE
SHAPE WE SEE FLIPPED THE OTHER
WAY.
WE WANT TO MAKE SURE THAT ACROSS
ALL PREDICTED VALUES OF Y THAT
THE PREDICTABILITY, ALL OF THE
RESIDUALS CAN BE EXPLAININGED
ACROSS WITH THE SAME STANDARD
DEVIATION.
SO THOSE ARE THE FOUR
ASSUMPTIONS.
SO TO GET INTO SPECIFICALLY WHAT
THE MODEL LOOKS LIKE.
SO-- SO A SIMPLE SCENARIO OF ONE
X VERSUS A Y REGRESSION, WOULD
TRY TO FIND THE RELATIONSHIP
BETWEEN X AND Y WITH A LINEAR
FIT WITH THE BLUE LINE.
SPECIFICALLY, FOR ONE
INDEPENDENT VARIABLE X AND
DEPENDENT MEASURE Y, THE
RELATIONSHIP FOR PREDICTING THE
ESTIMATED Y WILL BE CALLED Y-HAT
FOR EACH SUBJECT CAN BE WRITTEN
IN THIS WAY.
WHERE WE ARE ABLE TO FORM THIS
REGRESSION LINE WHICH IS
BASICALLY MADE UP OF OUR
PREDICTED Y VALUES.
AND FROM THIS LITTLE EVASION IS
WHY WE'RE ESTIMATING THESE BETAS
OR THESE COEFFICIENTS FROM THE
OUTPUT OF OUR REGRESSION MODEL.
SO BETA-1 IS OUR ESTIMATED
CHANGE IN Y FOR ONE UNIT CHANGE
IN X.
THIS IS OUR LITTLE SLOPE THAT WE
WOULD ABSTAIN FROM THE MODEL.
AND BETA-0 IN PRETTY MUCH ALL
CASES WE WILL CALL BETA-0 IS THE
INTERCEPT, BETA-1 IS THE FIRST
OBSERVED VARIABLE, NOT A SLOPE,
BUT IN THIS CASE IT IS A SLOPE,
BETA-0 IS ALWAYS THE INTERCEPT
IN A FORMAL LIFE.
THIS IS THE ESTIMATED VALUE OF Y
WHEN ALL X ARE ZERO.
OR IN THE SIMPLE ALGEBRAIC WAY,
THIS IS THE SIMPLE INTER SENT ON
THE GRAPH WHERE WE RUN INTO
ZERO.
AND THE DEGREE OF ERROR FROM THE
TRUE Y, SO ALL THESE BLACK
POINTS ARE OUR TRUE OBSERVE Y
VALUES.
THE DISTANCE THAT EACH OF THOSE
POINTS ARE FROM OUR -- OUR
PREDICTED LINE ARE SET OF ERROR
TERMS.
THIS EPSILON.
I FOR EACH PERSON.
SO EACH PERSON IS GIVEN AN ERROR
OF HOW FAR THEIR PREDICTION,
THEIR OBSERVED BEHAVIOR IS FROM
THE PREDICTED BEHAVIOR.
THIS IS SET OF ERRORS I HAVE
BEEN TALKING ABOUT FOR MEETING
OUR ASUNS OR NOT.
AND THIS PIECE OF THE EDUCATION
HERE IS OUR PREDICTED Y, OR
Y-HAT.
AND SO THIS IS KIND OF THE CRUX
OF THE REGRESSION WHICH IS TO
ESTIMATE THE BETA-0 AND BETA-1,
OR AS MANY COEFFICIENTS AS WE
HAVE, SUCH THAT THE SUM OF ALL
PREDICTED ERRORS ARE ALL OF OUR
EPSILONS IS AS SMALL AS
POSSIBLE.
WE FORMALIZE THAT, THIS IS JUST
A SUMMATION ACROSS ALL OF THESE
RED LINES HERE SQUARED.
SO THIS LITTLE Y, I MINUS Y-HAT,
I IS THE LITTLE DISTANCE OF
ERRORS AND WE SQUARE THEM SO
WE'RE NOT CANCELING OUT ALL OF
THE BUNCH OF ERRORS BY HAVING
SOME POSITIVE AND SOME NEGATIVE.
SO WE'RE JUST INTERESTED IN THE
MAGNITUDE.
AND SUMMING ALL OF THOSE AND
MINIMIZING, FITTING THE LINE
SUCH THAT WE'RE MINIMIZING THAT
SUMMED SQUARE OF ERRORS.
SO I WANT TO USE THAT FRAMEWORK
AND WALK THROUGH SOME EXAMPLES
OF DOING REGRESSION USING SAMPLE
DATA.
AND THIS IS REAL, REAL DATA THAT
IS AVAILABLE ONLINE SOURCED FROM
THE UC IRVINE MACHINE LEARNING
REPOSITORY USING 279 CARDIAC
PATIENTS AND I SPECIFICALLY
PULLED THE DATA USING THE
PACKAGE AVAILABLE THERE.
THIS IS A SET OF PATIENTS THAT
ARE REFERRED FOR CORONARY
ANGIOGRAPHY AT THE CLEVELAND
CLINIC.
NO PATIENTS HAD A HISTORY OF MI
OR CARDIOMYOPATHIC DISEASE.
AND ALL PATIENTS UNDERWENT ECG
AT REST, AND CHOLESTEROL, AND
FASTING BLOOD SUGAR MEASUREMENT
AND OTHER DATA COLLECTION
MEASUREMENTS HERE.
AND ALSO UNDERWENT EXERCISE ECG,
AND CARDIAC FLUOROSCOPY.
SO WE HAVE A SMALL SET OF
VARIABLES, AGAIN, THIS IS JUST A
PUBLICLY AVAILABLE DATASET THAT
I'M USING TO HELP US WALK US
THROUGH SOME OF THESE EXAMPLES.
I WILL BE SHOWING CODE SNIPPETS
AND OUTPUTS FROM OUR SOFTWARE
SPECIFICALLY, WHICH IS WHAT I'M
MOST OF THE TIME USING.
I GUESS I SHOULD JUST JUMP TO
THE DISCLAIMER PART, WHICH IS
THAT MOST SOFTWARE IS GOING TO
BE MORE OR LESS THE SAME IN
TERMS OF OUTPUT.
BUT YOU MAY NEED TO MAKE SURE
THAT YOU'RE LOOKING AT YOUR
DOCUMENTATION FOR WHATEVER
SOFTWARE YOU MAY BE USING TO DO
THIS, TO SET THE MODEL PROPERLY,
HOW THE SOFTWARE WOULD LIKE YOU
TO SET IT.
AND SIMILAR THAT YOUR DATA AND
EACH VARIABLE IS SPECIFIED AS
EXPECTED FOR USE WITH
REREGRESSION.
BECAUSE IT IS NOT ALWAYS, IT IS
NOT ALWAYS THE SAME IN EVERY
SOFTWARE.
AND IF YOU HAVE SPECIFIC
QUESTIONS ABOUT THIS, YOU KNOW,
OUR TEAM IS AVAILABLE FOR
QUESTIONS.
AS YOU WORK, BUT BROADLY, TO --
THE POINT SOME OF THE KEY ISSUES
THAT MAY COME UP WITH THIS,
WHICH IS DATA THAT'S
CATEGORICAL, SO DATA WITH THREE
OR MORE LEVELS SPECIFICALLY, BUT
ARE IN THE DATASET AS NUMBERS.
ZERO, ONE, TWO, ETC.
THAT MAY BE RECODED THIS FROM
BEING WRITTEN OUT WORD TO THEN
ONE, TWO.
I THINK MOST BY DEFAULT WILL
THINK THIS IS A NUMERICAL
VARIABLE.
WE DON'T WANT TO TREAT THIS AS A
NUMERICAL VARIABLE.
WE WANT THIS CODED AS A CODED
VARIABLE, SO WE WOULD NEED TO
SPECIFY TO THE SOFTWARE THAT'S
WHAT THIS IS, AND NOT BE
AUTOMATICALLY IN THE REGRESSION
AS A CONTINUOUS NUMERICAL
VARIABLE AND WE WANT AN ESTIMATE
FOR EACH OF THE LEVELS.
BINARY 0/1 VARIABLES DON'T NEED
TO BE RECODED BECAUSE THEY ARE
ONE LEVEL.
BUT CATEGORY VARIABLES WE WANT
TO SPECIFY THESE THE RIGHT WAY
FOR OUR SOFTWARE.
SO IN THIS DATA, WE COULD ASK A
QUESTION SUCH AS: IS AGE
RELATED TO THE MAXIMAL HEART
RATE ACHIEVED IN THESE PATIENTS
UNDERGOING EXERCISE TESTING?
I HAVE INCLUDED A GRAPH HERE TO
SHOW WHAT THIS DATA LOOKS LIKE.
AGAIN, WE HAVE ALMOST 300 DATA
POINTS.
AGE AND YEARS, AND THE MAXIMUM
HEART RATE ACHIEVED IN BEATS PER
MINUTE.
AND PERHAPS WERE INTERESTED IN
DESCRIBING THIS RELATIONSHIP.
AS I SAID BEFORE, WE MIGHT, WE
SHOULD VISUALLY LOOK AT THE DATA
BEFORE WE DO ANYTHING.
THE RELATIONSHIP DOES LOOK LIKE
SOMETHING THAT WE COULD DESCRIBE
WITH A LINE THAT LOOKS ROUGHLY
LINEAR.
THERE ARE NO MAJOR OUTLIERS ORAD
DISTRIBUTIONS THAT I CAN SEE
THAT MIGHT ALREADY GIVE US SORT
OF SOME RED FLAGS WITH RUNNING
REGRESSION.
SO AGAIN, THIS IS JUST A GOOD
WAY TO CHECK OUR DATA AND MAKE
SURE THAT ALL OF IT LOOKS THE
WAY IT SHOULD BEFORE WE EVEN
THINK ABOUT RUNNING THE
REGRESSION.
AND USING THE -- THE --
TERMINOLOGY FROM PRIOR SLIDES,
WE CAN WRITE SOMETHING LIKE THIS
TO SHOW WHAT IT IS WE'RE
ACTUALLY GOING TO TRY TO BE
ESTIMATING, I'M CALLING THIS THE
HEART RATE MAX.
THIS IS OUR OUTCOME OF INTEREST.
THEN WE WANT TO ESTIMATE BETA-0
AND BETA-1.
PARTICULARLY, WE'RE INTERESTED
IN, AGAIN, THIS BETA-1, THIS
SLOPE, THIS RELATIONSHIP BETWEEN
AGE AND HEART RATE.
AND AGE IS OUR KEY COVARIANT OF
INTEREST.
OUR INDEPENDENT VARIABLE.
SO, THIS IS, THESE ARE THE ONLY
THINGS WE NEED TO CONSIDER TO
ANSWER THIS QUESTION THE WAY
THAT WE PHRASE IT.
AND SO IN R, THE WAY YOU WOULD
SPECIFY THAT IS LIKE THIS.
AGAIN, THIS IS OBVIOUSLY GOING
TO BE DEPENDENT DEPENDING ON
WHAT SOFT YOU'RE USING.
THERE IS THIS LITTLE LM FUNCTION
THAT RUNS LINEAR REGRESSION.
WE TELL THE SOFTWARE WHAT DATA
WE'RE PULLING FROM.
THIS REALLY POORLY NAMED
VARIABLE, I THINK, FOR A
PUBLICLY AVAILABLE DATASET IS
OUR MAXIMUM HEART RATE ACHIEVED
VARIABLE AND OUR SINGLE
PREDICTOR OF AGE AND THE
REGRESSION IS SPLIT ON EITHER
SIDE OF PREDICTORS AND OUTCOME
VARIABLES BY THIS LITTLE THING.
WE CAN CALL, SO WE RUN THE
MODEL, WE CALL THE OUTPUT USING
THE SUMMARY FUNCTION AND WE GET
THIS OUTPUT.
WHICH IS JUST A SIMPLE TABLE
BROKEN DOWN INTO A SUPPLE
COLUMNS AND ONE ROW FOR EACH
BETA OR EACH COEFFICIENT THAT
WE'RE ESTIMATING FROM THE
REGRESSION.
AND THE COLUMNS GIVE US ALL OF
THIS STATISTICAL DETAILS THAT WE
NEED.
FIRST IT GIVES US THE ESTIMATE,
WHICH IS THE ACTUAL VALUE OF THE
BETA THAT WE'RE ESTIMATING.
WE ALSO HAVE A STANDARD ERROR
FOR THAT ESTIMATE.
A T-VALUE TO, AGAIN, GO ALONG
WITH THAT ESTIMATE.
AND THE P-VALUE, WHICH IS
DENOTED IN R WITH THE
TERMINOLOGY, AND THE STAR HERE
THAT TEMPS US IT IS SIGNIFICANT.
THAT'S IMPORTANT TO US.
IT WILL LOOK FAIRLY SIMILAR FOR
MOST ORT SOFTWARES AS WELL.
WHEN WE LOOK AT THIS, THIS IS
HOW WE WOULD INSTILL IN OUR
EQUATION, I PUT IT OVER HERE ON
THIS GRAPH.
I'VE ALSO SHOWN THE ESTIMATED
LINES THAT WE GET.
THIS RED LINE IS ACTUALLY THIS Y
EQUALS NX PLUS B-LINE DIRECTLY
OVERLAID ON OUR DATA.
AND AGAIN, OUR BETA-0 IS OUR
ESTIMATE.
204 ROUGHLY.
AND OUR SLOPE IS NEGATIVE SLOPE
OF ABOUT ONE OF, ONE.
SO AGAIN, THIS IS SORT OF HOW WE
FILL THIS IN HERE, INTO EACH.
AND SO, I WANT TO TALK ABOUT THE
SPECIFIC INTERPRET TASE OF EACH
OF THESE.
-- INTERPRETATION OF EACH OF
THESE.
SO THE INTERCEPT, AGAIN, IS THE
ESTIMATED HEART RATE FOR AN
INDIVIDUAL AT AGE ZERO.
AND THIS IS 204.15 BEATS PER
MINUTE.
THIS IS ALSO NOTED TO BE
STATISTICAL SIGNIFICANT.
AND THIS IS COMPARING TO ZERO,
STATISTICAL GREATER THAN ZERO.
IF WE WANT THIS TO BE A MORE
INTERPRETABLE INTERCEPT, WE CAN
DO SOMETHING CALLED MEAN
CENTERING, OR CENTERING, SOME OF
YOU MAY HAVE HEARD OF THIS
BEFORE, THIS WOULD BASICALLY
JUST DO SOMETHING WHICH GIVES US
MORE INTERPRETABLE INTERCEPT.
WE WOULD TAKE EACH AGE OF THE
PERSON IN THE COHORT, CALCULATE
A COHORT AVERAGE AGE, AND FOR
EACH PERSON CALCULATE THE CHANGE
FROM THAT COHORT MEAN.
AND SO EACH PERSON'S NEW MEAN
CENTERED AGE WOULD BE RELATIVE
TO THAT AGE.
THEN IF WE USE THAT RECALCULATED
IN A VARIABLE.
THE INTERCEPT WOULD BE THE
ESTIMATED HEART RATE AT THE
COHORT MEAN AGE, INSTEAD OF AT
ZERO AGE.
IT WOULD BE AT ZERO, WHICH IS IS
NOW ZERO THAT MEANS THE MEAN.
WE CAN DO THINGS LIKE THAT TO
OUR VARIABLES TO HELP US
INTERPRET INTERCEPTS A LITTLE
BIT BETTER.
BUT ALTHOUGH, I THINK, BROADLY.
WE AREN'T USUALLY INTERESTED IN
INTERPRETING INTERCEPTS.
AND THEN THE AGE COEFFICIENT.
AND THIS IS, WE WOULD INTERPRET
THIS AS THE ESTIMATED HEART RATE
DECREASES BY 1.0002 BEATS PER
MINUTE PER YEAR INCREASE IN AGE.
AGAIN, THAT'S THE, OUR NICE
INTERPRETATION OF SLOPE THAT
MOST OF US ARE FAMILIAR WITH.
THE TRICK IS JUST KNOWING HOW --
AGAIN, IT IS WHAT OUR OUTCOME
VARIABLE, WHICH IS MEASURING
BEATS PER MINUTE, AND THEN PER
INCREASING UNIT IN AGE.
AGAIN, THIS IS A NEGATIVE SLOPE,
SO WE HAVE A DECREASE IN HEART
RATE OVER TIME.
THIS IS WHERE HAVING THE FIGURE
ALSO HELPS, YOU CAN MAKE SURE
THAT YOU'RE INTERPRETING IT
RIGHT WAY.
IT SHOULD ALL JIVE WITH HOW
YOU'VE THINKING ABOUT IT.
THIS IS STATISTICAL
SIGNIFICANTLY DIFFERENT FROM A
SLOPE OF ZERO WHICH IS NO
RELATIONSHIP, AND NO CHANGE
ACROSS INCREASING AGE.
AND I WANT TO POINT OUT THAT
MAYBE THIS IS LIKE A TECHNICAL
POINT, BUT THIS SLOPE, I WANT TO
JUST BE CAREFUL ESPECIALLY WHEN
WE TALK ABOUT AGE AND PER YEAR.
THIS IS A COHORT-LEVEL BEHAVIOR
IN TERMS OF WE'RE NOT TALKING
ABOUT AS A PERSON AGES, BECAUSE
THIS ISN'T LONGITUDINAL DATA.
THIS IS SAYING AS WE LOOK AT
PEOPLE WHO ARE OLDER WE HAVE
THIS RELATIONSHIP.
IT YOU WANTED TO ACTUALLY SAY AS
A PERSON AGES OR WITH -- AS A
PERSON GETS OLDER YOU WOULD HAVE
TO BE DOING REPEATED MEASURES ON
THE SAME PERSON.
SO THIS IS A FUNNY
INTERPRETATION HERE, AND BOTH OF
ARE GOING TO EXTRAPOLATE TO SAY,
AS YOU ARE OLDER YOUR MAXIMUM
HEART RATE IS LOWER.
BUT TO BE CAUTIOUS AND SAY THIS
IS NOT ACTUALLY LONGITUDINAL
DATA, THIS IS A CROSS-SECTION,
WE MIGHT NOT HAVE A GOOD INTERN
TRUITATION OF THAT HERE.
AND JUST TO SPEAK TO THE
PREDICTION POINT OF THIS A
LITTLE BIT.
SO I JUST WANT TO POINT OUT THAT
YOU COULD HAVE A SCENARIO WHERE
MAYBE, WITH THIS MODEL, WITH
THIS PREDICTED MODEL, MAYBE YOU
WANT TO KNOW THE BEHAVIOR OF
SOMEBODY WITH SOME
CHARACTERISTICS.
MAYBE IT IS JUST HANE, OR MAYBE
IF WE HAD A LONGER MODEL THIS
MIGHT BE MORE USEFUL, WE HAD
DIFFERENT SETS OF
CHARACTERISTICS ON A PERSON.
SAY, FOR EXAMPLE, WE JUST WANTED
TO KNOW WHAT PREDICTED MAXIMUM
HEART RATE ACHIEVED FOR AN AGE
AGE 50 WOULD BE, WE WOULD PLUG
THAT IN AND DO THE CALCULATION
IN THE WAY YOU WOULD EXPECT.
AND GET A NUMBER OF 154.15 BEATS
PER MINUTE.
YOU CAN SEE NOW YOU WOULDN'T GET
A NUMBER FROM THIS, BUT YOU CAN,
THE WAY THAT THIS IS HAPPENING,
AGAIN, WE'RE JUST USING AGE.
WHEREAS ON THE PREDICTED LINE
AND WHAT IS THE Y ATTRIBUTED TO
THAT VALUE ON THE PREDICTED
LINE.
AND IN R AND IN MOST OTHER
SOFTWARES THERE ARE GOING TO BE
A BUNCH OF OTHER PIECES OF THE
OUTPUT AS WELL.
I'M NOT GOING TO TALK A WHOLE
LOT ABOUT A LOT OF THIS STUFF.
JUST FOR THE SAKE OF TIME.
REALLY.
AND COMPLEXITY.
BUT THERE ARE A COUPLE PIECES
HERE THAT I'M SHOWING IN THE R
OUTPUT.
THE FIRST IS RESIDUAL STANDARD
ERROR, THIS IS THE STANDARD
DEVIATION OF THOSE ERRORS.
AGAIN, THIS IS, THE PIECE OF --
THE PUZZLE THAT WE TALKED ABOUT
EARLIER WHICH IS THAT ALL THOSE
ERRORS SHOULD HAVE THE SAME --
THERE SHOULD BE UNIFORM
VARIABILITY ACROSS THE ERRORS.
THIS IS KIND OF COMING, THIS IS
WHERE THAT PIECE COMES IN.
THEY ARE ALL ABLE TO BE WELL
DESCRIBED BY A SINGLE DEVIATION
OR VARIABILITY.
THIS GIVES YOU THAT STATISTIC.
WE ALSO HAVE A MULTIPLE R
SQUARED, ADJUSTED R SQUARED.
THIS IS THE REPORTERRING OF THIS
TYPE OF THING IS VARYING BY
SOFTWARE AS WELL.
PREFER TO YOUR DOCUMENTATION
WHAT IS SPECIFICALLY BEING
RECORDED THERE.
AND I, AGAIN, A LOT OF PEOPLE
LIKE TO TALK ABOUT R SQUARED.
I'M NOT GOING TO REALLY SAY TOO
MUCH ABOUT THAT HERE BECAUSE I
DON'T REALLY FIND THEM TO BE
THAT HELPFUL, HONESTLY.
I THINK THEY ARE REALLY
DEPENDENT ON YOUR DATA AND, AND
Ns AND THE NUMBER OF VARIABLES
THAT YOU PUT IN HERE.
ALTHOUGH, IN SOME WAYS ADJUSTED
AND MULTIPLE R SQUARES ACCOUNT
FOR THE VARIABLES IN THE MODEL.
ESSENTIALLY WHAT R SQUARED IS
TRYING TO DO IS DESCRIBE THE
PORTION OF VARIANCE RELATIVE TO
THE VARIANCE OF THE ERRORS.
SO, HOW WELL DOES THE MODEL
CAPTURE ALL OF THE VARIABILITY
THAT'S BEING EXPLAINED?
AND I THINK YOU CAN KIND OF SEE
VISUALLY THAT WHILE THERE IS A
NEGATIVE SLOPE HERE, WHILE THERE
IS SOME EXPLANATORY POWER OF
THIS LINE, THAT OBVIOUSLY, IT IS
NOT PERFECTLY PREDICTIVE OF A
PERSON'S MAXIMUM HEART RATE
ACHIEVED.
THERE IS SOME OTHER VARIABLE
THAT IS IN?
EACH PERSON'S OBSERVATION THAT
WE ARE NOT ABLE TO CAPTURE WITH
THE SIMPLE MODEL.
BUT I THINK MOST OF US HAVE
INTUITIVE UNDERSTANDING WHEN WE
LOOK AT THIS, THERE ARE A LOT
MORE VARIABLES AT PLAY HERE THAT
WOULD BE INFLUENCING A PERSON'S
OBSERVED HEART RATE.
THERE IS ALSO AN F-STATISTIC AND
A P-VALUE FOR, THIS SHOULD SAY
MODEL, FOR THE MODEL OVERALL,
AGAIN, I DON'T REALLY WANT TO
SPEND TIME TALKING ABOUTCIFICLY.
WE WILL TALK ABOUT F-TESTS
LATER.
THIS IS JUST TELLING YOU IS THE
MODEL USEFUL TO RUN AT ALL.
I THINK HONESTLY THAT HAS MORE
TO DO WITH THE GOALS OF THE
INVESTIGATION THEN IT DOES WITH
F-STATISTICS, BUT -- YEAH.
AND SO FROM THAT MODEL THAT WE
JUST RAN, WE WOULD ALSO CHECK
MODEL FIT.
THIS IS ACTUALLY A SET OF
OUTPUTS FROM R.
R AND SOME OTHER SOFTWARES WILL
HAVE BUILT IN MODEL CHECKING
THAT YOU COULD DO DEPENDING ON
HOW YOU ACCESS THOSE.
AGAIN, THAT'S GOING TO DEPEND ON
YOUR SOFTWARE.
BUT IN R, YOU CAN PULL UP THESE
THINGS TO INVESTIGATE MODEL FIT.
SO ON THE LEFT, WE WOULD BE
INVESTIGATING THE NORMALITY OF
THE RESIDUALS AND ON THE RIGHT,
IS THERE THAT NICE EVEN
DISTRIBUTION OF RESIDUALS ACROSS
ALL VALUES OF Y.
SO, ON THE LEFT, AGAIN, WE
TALKED ABOUT HOW, A LITTLE BIT
HOW WE'RE NOT REALLY EVER GOING
TO SEE A PERFECT X EQUALS Y
HERE.
WE DO SEE A LITTLE BIT OF THIS
TAILING OFF HERE.
SO MAYBE THERE IS A LITTLE BIT
OF SKEWED BEHAVIOR.
BUT PERHAPS NOT ENOUGH TO REALLY
DO ANYTHING ABOUT JUST WORTH
NOTING.
AGAIN, I THINK VISUALLY, THE
MODEL THAT WE FIT SORT OF JIVES
WITH WHAT WE WOULD EXPECT TO
SEE.
SO I DON'T THINK THAT WE'RE
SEEING ANY BEHAVIOR UNEXPECTED
OR DUE TO POOR MODEL FIT.
AND THE RESIDUAL BEHAVIOR FOR
VARIANCE ALSO PRETTY GOOD.
IT MAY BE MORE CIRCULAR, BUT IT
IS STILL FAIRLY EVEN.
THERE IS A LITTLE BIT MORE
VARIABILITY TOWARDS THE MIDDLE
THEN AT THE END, PERHAPS.
BUT AGAIN, NOTHING SUPER CRAZY
LOOKING HERE FOR MODEL FIT.
SO MOVING ONTO ADDING
COVARIANTS.
SO, WE CAN MAKE A MODEL MUCH
MORE COMPLEXES BY ADDING
COVARIANCES INTO THE REGRESSION.
SO PERHAPS WE WANT TO CONTROL
FOR FASTING BLOOD SUGAR, SERUM
CHOLESTEROL, AND THE SLOPE OF ST
SEGMENT, THREE -- SMALLINAL,
UPSLOPING, FLAT, AND
DOWNSLOPING.
PERHAPS WE WANT TO ASK ABOUT AGE
AND ALSO CONTROLLING FOR THE
OTHER VARIABLES.
IN THIS CASE, FASTING BLOOD
SUGAR IS BINARY.
SPLIT IT 120.
AND SERUM CHOLESTEROL IS A
CONTINUOUS METRIC.
SO WE CAN RUN THAT MODEL OUTPUT
LOOKS SIMILAR, BUT JUST WITH
MORE ROWS, RIGHT?
BECAUSE WE HAVE MORE
COEFFICIENTS.
AND RECALL THAT THE
INTERPRETATION OF THE INTERCEPT
IS HOLDING ALL OF THE OTHER
ITEMS THAT ZERO, WHICH MEANS
EACH GROUP NEEDS TO HAVE A
REFERENCE GROUP.
SO FOR CONTINUOUS VARIABLES THIS
IS ZERO NATURALLY.
AND FOR BINARY VARIABLES OR
CONTINUOUS VARIABLES WE JUST
NEED TO BE CLEAR ABOUT WHAT THE
REFERENCE GROUPS ARE AND PERHAPS
WE ACTUALLY WANT TO SET THOSE
BEFORE WE RUN THE MODEL.
AS FAR AS THE OUTPUT, THE
MISSING ITEM IN THE ROWS IS THE
REFERENCE GROUP.
AND SO, WE SEE TWO ROWS
ACCOUNTED FOR HERE FOR ST SLOPE,
THE DOWNSLOPE AND UPSLOPING
GROUP, THE REFERENCE IN THIS
CASE WOULD BE FLAT.
FASTING BLOOD SUGAR TRUE THAT
MEANS IT IS GREATER THAN 120,
THE REFERENCE LEVEL IS 120.
AND AGAIN, FOR AGE AND
CHOLESTEROL, THE -- THE
REFERENCE REALLY IS ZERO.
AS FAR AS THAT.
AND BOTH OF THESE ARE NOT
CENTERED.
IN THIS MODEL.
AND WE CAN WRITE OUT THIS
EQUATION IN A -- SIMILAR WAY
THAT WE WOULD WRITE OUT OUR
SIMPLE EQUATION THAT WE LOOKED
AT.
OUR BETA-0 AND BETA-1.
WE ADD ALL OF THE OTHER
VARIABLES IN.
SO WE HAVE A BINARY VARIABLE
THAT IS ATTACHED TO OUR BETA-2
WHICH TELLS US ABOUT THE FASTING
BLOOD SUGAR BEHAVIOR.
WHETHER IT IS EQUAL, WHETHER OR
NOT IT'S GREATER THAN 120.
WE HAVE OUR CONTINUOUS
CHOLESTEROL MEASUREMENT ATTACHED
TO BETA-3.
AND THEN TWO ADDITIONAL
COEFFICIENTS WHICH ARE ATTACHED
TO INDICATOR VARIABLES ABOUT
WHETHER THE ST SLOPE IS DOWN
SLOPING OR UPSLOPING.
AND AGAIN, THE THINGS IN
PARENTHESES HERE I'M CALLING
THESE INDICATOR VARIABLES ARE
THAT THAT OR THE REFERENCE?
IF THEY ARE NOT DOWN OR UP, BOTH
OF THESE WOULD BE ZERO.
AND WE WOULD BE TALKING ABOUT
THE REFERENCE WHICH IS CONTAINED
IN THE INTERCEPT.
SO LET'S JUST STEP THROUGH THE
INTERPRETATION.
SO, WHEN AGE IS ZERO, THE
FASTING BLOOD SUGAR IS LESS THAN
20.
ABOUT 120, THE CHOLESTEROL IS
ZERO.
AND ST SLOPE IS FAST.
THE HEART RATE IS ESTIMATED TO
BE 178.9.
FOR AGE, AGAIN, THIS IS SORT OF
SIMILAR TO WHAT WE TALKED ABOUT
BEFORE.
BUT WE HAVE THIS ADDITIONAL
LANGUAGE OF WHEN HOLDING ALL
OTHER VARIABLES CONSTANT.
SO WHEN WE LOOK AT PEOPLE WITH
SIMILAR OTHER CHARACTERISTICS OF
FASTING BLOOD SUGAR,
CHOLESTEROL, AND ST SLOPE, THE
ESTIMATED HEART RATE DECREASES,
NEGATIVE SLOPE, BY .8649 BEATS
PER MINUTE FOR ONE YEAR INCREASE
IN AGE.
AND THE INTERPRETATIONS FOLLOW
SIMILARLY TO THAT.
SO, THIS IS BINARY.
THIS FASTING BLOOD SUGAR IS
BINARY.
SO AGAIN, COMPARING FOR OUR
REFERENCE GROUP.
THE MAXIMUM HEART RATE IS 2.0059
BEATS PER MINUTE HIGHER IN THE
120-MILLIGRAM PER DECILITER
PATIENT, GREATER THAN, COMPARED
TO LESS THAN 120-MILLIGRAM PER
DECILITER PATIENT.
FOR THE CHOLESTEROL, THE
ESTIMATED HEART RATE INCREASES
BY .0343 BEATS PER MINUTE FOR
EVERY ONE UNIT INCREASE IN
CHOLESTEROL.
AGAIN, WE CAN ALSO LOOK AT
SIGNIFICANCE FOR ALL OF THESE,
BUT THE LAST TWO WERE NOT
SIGNIFICANT.
AND THEN WE HAVE THIS LIKE
THREE-LEVEL CATEGORICAL VARIABLE
THAT IS REPRESENTED BY TWO LINES
OF OUTPUT HERE.
WE CAN INTERPRET BOTH OF THOSE
IN RELATIONSHIP TO THE REFERENCE
GROUP OF FLAT SLOPE, FLAT ST
SLOPE.
SO THE ESTIMATED HEART RATE IS
ROUGHLY FIVE BEATS PER MINUTE
HIGHER ON AVERAGE FOR ST
DOWNSLOPES COMPARED TO FLAT ST.
THIS IS POSITIVE.
FOR POSITIVE CHANGE FROM THE
REFERENCE GROUP.
AND 18, ROUGHLY 18 BEATS PER
MINUTE HIGHER FOR ST UPSLOPES
COMPARED TO FLAT ST HAS THE
REFERENCE GROUP.
YOU CAN SEE THAT ACTUALLY THAT
CHANGES SIGNIFICANT, THAT IS
NOTED HERE ON THIS SLIDE.
WHAT WE CAN DO WHEN WE HAVE
VARIABLES WITH THREE OR MORE
LEVELS, WE CAN TALK ABOUT LIKE
IN THE ENOVA FRAMEWORK, IF YOU
WANT TO SAY, F STATISTICS OF THE
EFFECT OVER ALL OF THAT
VARIABLE.
THIS CAN BE A USEFUL WAY TO DO
SOME OF THE REPORTING OF
VARIABLES THAT HAVE MULTIPLE
LEVELS.
BECAUSE NOW, WE CAN SAY THAT ST
SLOPE OVERALL, WHICH IS TWO
DEGREES OF FREEDOM, THREE
LETHES, IS SIGNIFICANT, WHAT WE
CAN DO IS, IF WE WANTED ALL
PAIRWISE COMPARISONS OR IF WE
STEP ASIDE TO DO PAIRWISE
COMPARISONS BETWEEN EACH OF
THESE LEVELS, PERHAPS WE SET UP
THE REGRESSION IS SUCH THAT WE
ARE ONLY CARE ABOUT COMP PEERING
EACH OF THESE TWO FLAT ST SLOPES
IN THE WAY THAT I ALREADY
SPECIFIED IT.
MAYBE WE ALSO JUST WANT TO
REPORT THIS ONE.
DEPENDING ON WHAT YOUR GOALS
ARE, YOU CAN DO IT EITHER WAY.
AND FOR LAST EXAMPLE I WANT TO
TALK ABOUT, AGAIN, KIND OF
GETTING BACK TO A SMALLER MODEL,
BUT ADDING COMPLEXITY IN TERMS
OF ADDING AN INTERACTION TERM,
WHAT WE CAN ASK OF A MODEL, TOO,
IS THERE A DIFFERENT
RELATIONSHIP BETWEEN AGE AND
HEART RATE DEPENDING ON WHETHER
THE INDIVIDUAL HAS HEART
DISEASE.
SO I PUT THE GRAPHS HERE,
GRAPHED SEPARATELY BY HEART
DISEASE STATUS FOR THE
INDIVIDUAL.
AND AGAIN, DOING AN INDIVIDUAL
INSPECTOR TO SEE WHAT IS GOING
ON AND WHETHER WE HAVE BEHAVIOR
THAT IS EASILY EXPLAINABLE BY A
REGRESSION.
WE WRITE THE MODEL AS FOLLOWS.
SO WE HAVE THE INTERCEPT AS
BETA-0, OR BETA-1 AGE.
OR BETA-2, WHICH IS ATTACHED TO
OUR INDICATOR VARIABLE OF
WHETHER OR NOT A PERSON HAS
HEART DISEASE.
AND THEN OUR BETA-3, WHICH IS
ATTACHED TO THE INTERACTION, THE
INTERACTION BETWEEN THOSE TWO
PIECES.
AND I JUST WANT TO OUTLINE
SPECIFICALLY HOW THIS GIVES US
TWO DIFFERENT SLOPES.
SO, WE, BECAUSE OF THE WAY THAT
THESE INDICATOR VARIABLES BREAK
THE EQUATION APART, WE END UP
WITH TWO EQUATIONS FOR THOSE
WITH HEART DISEASE OR WITH OR
WITHOUT HEART DISEASE.
SO THE EQUATION FOR THOSE WITH
HEART DISEASE, THESE INDICATOR
PIECES TURN TO ONE.
AND SO WE HAVE BETA-0 PLUS
BETA-1 TIMES IN A PLUS BETA-2
PLUS BETA-3 TIMES IN A.
WE RESHUFFLE IT USING OUR
ALGEBRA AT, WE GET BETA-0 PLUS
BETA-2, PLUS BETA-1 PLUS BETA-3
BOTH TIMES AGE.
WE CAN THINK OF IT THIS AS BEING
OUR AGE SLOPE.
THE EQUATION FOR THOSE WITHOUT
HEART DISEASE, WE HAVE THE
ZEROS.
NOT INDICATING HEART DISEASE.
AND SO, BOTH BETA-2 AND BETA-3
DROPOUT OF THE CALCULATION.
SO WE'RE JUST LEFT WITH BETA-0
PLUS BETA-1 TIMES IN A.
SO HIGHLIGHTED IN RED, WE CAN
ACTUALLY SEE ALGEBRAICALLY, WE
HAVE IN THOSE WITHOUT HEART
DISEASE, A BETA-1 SLOPE FOR AGE.
AND THOSE WITH HEART DISEASE, WE
HAVE BETA-1 PLUS SOME OTHER UNIT
TO DESCRIBE THE CHANGE IN THE
SLOPE FOR THOSE WHO HAVE HEART
DISEASE.
SO THAT'S, THAT'S HOW WE DO IT
MATHEMATICALLY, THAT IS HOW IT
WILL APPEAR IN THE OUTPUT.
WE HAVE BETA-0, BETA-1, BETA-2,
BETA-3 FOR EACH IN THE ROWS OF
THE OUTPUT.
IN R THE INTERACTION TERM IS
NOTE WOULD THIS LITTLE COLON
SEPARATING THE TWO VARIABLES.
AGAIN, THIS MIGHT VARY DEPENDING
ON YOUR SOFTWARE AND BOTH OF THE
MAIN EFFECTS.
WE CAN SEE THE INTERACTION TERM
IS SIGNIFICANT HERE IN THAT EACH
GROUP IS WELL ESTIMATE TODAY
HAVE THEIR OWN SLOPE.
THIS IS A BENEFICIAL ESTIMATION
TO DO.
THAT'S A CHANGE IN THE SLOPE
BETWEEN GROUPS IS .6 9-1-1 BEATS
PER MINUTE PER YEAR.
YOU CAN SEE IT VISUALLY HERE.
THAT, THAT THE SLOPE IS LESS
NEGATIVE IN THOSE WITH HEART
DISEASE THAT ACTUALLY THE
ESTIMATION OF THE SLOPE IS MORE
POSITIVE IN THOSE WITH HEART
DISEASE COMPARED TO NO HEART
DISEASE.
SO AGAIN, JUST TO BE SPECIFIC,
IN INDIVIDUALS WITHOUT HEART
DISEASE, THE MAXIMUM HEART RATE
ACHIEVED IS ETC. MATED TO BE
1.0525.
THIS BETA-1 HERE, LOWER FOR
EVERY YEAR INCREASE WITH AGE.
EVERY YEAR INCREASE IN AGE.
AND INDIVIDUALS WITH HEART
DISEASE, AGAIN, WE HAVE THIS
BETA-1 PLUS BETA-3, TO GET OUR
NEW ESTIMATED SLOPE, AND THIS
SLOPE IS NEGATIVE .3614 BEATS
PER MINUTE PER YEAR INCREASE IN
AGE.
SO, AGAIN, JUST FORMALIZING IT
HERE.
AND IN SOME SOFTWARE AND IN R,
YOU CAN ACTUALLY ASK THE
SOFTWARE TO GIVE YOU THESE
NUMBERS SPECIFICALLY SO YOU
DON'T HAVE TO CALCULATE IT.
WITH THIS COMES THE CONVENIENCE
OF ACTUALLY HAVE A SIGNIFICANT
TEST FOR EACH SLOPE.
SO HERE FORMALLY, WE CAN SEE
THAT THE NO HEART DISEASE GROUP
STILL DOES HAVE THIS STIG TIFF
ACCIDENT LATE NEGATIVE
RELATIONSHIP WITH HANE AND HEART
RATE.
AND IN THE HEART DISEASE GROUP,
WHILE ALSO, WHILE BEING
DIFFERENT IT ALSO IS, NOT
SIGNIFICANTLY DIFFERENT FROM
ZERO.
SO THEY'RE IN THE HEART DISEASE
GROUP, THIS NEGATIVE SLOPE IS
ACTUALLY NOT STATISTICAL
SIGNIFICANT FROM THE ZERO.
SO, THIS CAN BE A HELPFUL WAY TO
FRAME THE RESULTS AS WELL.
SO, I JUST WANTED TO WALK
THROUGH A COUPLE LIKE MODEL
BUILDING FRAMEWORK OR POSSIBLE
ISSUES THAT MAY COME UP TO THINK
ABOUT WHILE YOU BUILD YOUR
MODELS.
SO, WE OBVIOUSLY RAN THROUGH A
BUNCH OF EXAMPLES, IT CAN BE
KIND OF OVERWHELMING TO THINK
ABOUT HOW TO BUILD A MODEL.
I THINK IT IS REALLY IMPORTANT
TO LOOK AT YOUR KEY QUESTION OF
INTEREST.
BE VERY CLEAR ABOUT THAT IN
TERMS OF WHAT YOUR OUTCOME
MEASURE IS.
DO WE HAVE A KEY PREDICTOR
VARIABLE OF INTEREST?
DO WE HAVE ANY CONFOUNDING
VARIABLES THAT WE KNOW FROM THE
LITERATURE OR PRIOR RESEARCH
THAT WE DEFINITELY WANT TO
INCLUDE?
THINKING ABOUT ALL OF THOSE
THINGS IN ADVANCE ARE GOING TO
BE HELPFUL TO HELP TARGET YOUR
BUILDING OF THE MODEL.
YOU SHOULD ASK ARE WE INCLUDING
ALL RELEVANT VARIABLES AND
LEANING ON THE LITERATURE
PERHAPS AND THE UNDERSTANDING OF
WHAT IS RELATED TO YOUR OUTCOME
OF INTEREST.
AND MORE IMPORTANTLY, ARE WE
COMPARING VARIABLE
INTERRELATEDNESS.
WE CAN CAUSE ISSUE WITH MODEL
FIT WHEN WE HAVE A BUNCH OF X
VARIABLES THAT ARE ALL HIGHLY
CORRELATED WITH EACH OTHER.
WE DEFINITELY WANT TO MAKE SURE
THAT WE'RE AVOIDING ANY ISSUES
ANY OF OUR INDEPENDENT VARIABLES
BEING TOO HIGHLY CORRELATED OR
PERHAPS EVEN EXACTLY CORRELATED
IN WHICH WE WOULD HAVE ISSUES
WITH MODEL CONVERGENCE, THE
MODEL WANT RUN, OR ESTIMATE
THOSE ASPECTS OF THE MODEL.
THOSE ARE ALSO THINGS TO
CONSIDER.
FOR SCENARIO WHERE WE DO HAVE A
COMPLEX SET OF VARIABLES OR A
LOT OF VARIABLES, WE CAN
CONSIDER THINGS SUCH AS STEPWISE
REGRESSION OR OTHER SORTS OF
VARIABLE SELECTION TECHNIQUES TO
BUILD THE MODEL.
I WOULD SAY MOST OF THE TIME, WE
DO WANT A LITTLE BIT MORE
CONTROL OVER THE VARIABLES THAT
WE INCLUDE.
SO I WOULD SAY MOST CASES THAT
MIGHT BE KIND OF A LAST RESORT.
YOU, I THINK, IN MOST CASES WE
KNOW WHAT VARIABLES WE WANT TO
INCLUDE AND PERHAPS WE'RE ONLY
LIMITED BY SAMPLE SIZE IN TERMS
OF BEING ABLE TO HAVE A BIGGER
MODEL.
YOU CAN GO THROUGHERTERATIONS OF
MODEL BUILDING WITHIN REASON TO
EXPLORE MODEL FIT AND FINE-TUNE
WHAT VARIABLES YOU WANT TO
INCLUDE.
I THINK MOST OF THE WITH ERK
THAT WE DO IN NIMs AS FAR AS
REGRESSION IS CONCERNED, WHEN WE
GET TO THAT POINT, WE'RE TALKING
ABOUT EXPLORATORY ANALYSIS.
IF YOU FEEL YOU ARE ABLE TO LOOK
AT THE DATA AND THING ABOUT THE
MODEL.
I THINK THE KEY HERE IS THAT BE
MINDFUL THAT YOU SHOULD PROBABLY
STILL BE REPORTING ALL OF WHAT
YOU'RE INVESTIGATING, YOU KNOW
AT THE BOTTOM, IN TERMS OF THE
THINGS THAT YOU TRIED.
THE ISSUES THAT YOU RAN INTO.
WHY YOU INCLUDED VARIABLES AND
NOT OTHERS.
THE FIRST MODEL THAT YOU
SPECIFIED OR THE 50th.
SO BE MINDFUL THAT YOU DO WANT
TO SPEAK TO SOME OF THAT AS
WELL.
AS FAR AS PUBLISHING RESULTS AND
COMING UP WITH THE FINAL MODEL.
AND WE ALSO NEED TO THINK ABOUT
WHAT OUR SAMPLE SIZE IS AND HOW
MANY VARIABLES WE CAN INCLUDE.
THERE ARE VARIETY OF RULES OF
SUM FOR THIS.
JUST BE MINDFUL, IF YOU DON'T
HAVE A HUGE SAMPLE SIZE, YOU
CAN'T RUN A HUGE MODEL.
AND EVERY VARIABLE YOU ADD IS
GOING TO PULL POWER AND IF WE
DON'T HAVE ENOUGH PEOPLE TO WELL
ESTIMATE?
OF THESE THINGS, IT CAN BE
DIFFICULT TO HAVE A WELL-BEHAVED
MODEL.
SHOW JUST BE MINDFUL, WE CANNOT
RUN MODELS WITH 20 VARIABLES
WHEN WE HAVE 20 PEOPLE TO BE
DRAMATIC HERE.
SO LET'S QUICKLY GO THROUGH SOME
RESULTS REPORTING FOR EACH OF
THE EXAMPLES.
I WANT TO DO THIS.
WE TALKED ABOUT THE WAYS THAT WE
CAN SAY SOME OF THESE THINGS,
BUT I JUST WANT TO BE SPECIFIC
HOW WE WOULD WRITE THEM.
I THINK SOMETIMES PEOPLE
STRUGGLE WITH THIS PART.
AND AGAIN, SO JUST GOING BACK TO
THE PREVIOUS EXAMPLE.
THIS IS OUR SIMPLE LINEAR
REGRESSION EXAMPLE, WHERE WE HAD
JUST AGE AND HEART RATE.
AND HERE ARE OUR LITTLE FIGURES
FOR THIS.
SO IN THE METHODS WE CAN WRITE
SOMETHING LIKE: A SIMPLE LINEAR
REGRESSION WAS PERFORMED TO
INVESTIGATE THE RELATIONSHIP
BETWEEN HANE IN YEARS AND THE
MAXIMUM HEART RATE ACHIEVED BY
THE PATIENT IN BEATS PER MINUTE
HERE ACTUALLY.
MODEL CHECKING WAS PREFORMED TO
CHECK RESIDUAL BEHAVIOR.
LINEAR REGRESSION IN THE RESULTS
SESSION, YOU CAN WRITE SOMETHING
LIKE LINEAR REGRESSION SHOWS
THAT AGE WAS SIGNIFICANTLY
RELATED TO PLAQUE MEMO HEART
RATE ACHIEVED WITH A DECLINE OF
ONE HEART RATE PER MINUTE WITH
AGE, P LESS THAN 0.001.
INVESTIGATES OF RESIDUAL
DISTRIBUTION AND BEHAVIOR,
INDICATED AT A RELATIVE LENORMAL
DISTRIBUTION.
O, AGAIN, I WOULD SAY THAT WE
VERY RARELY SEE THIS SORT OF
THING WRITTEN IN PAPERS.
I DON'T THINK IT IS A BAD THING.
I THINK YOU SHOULD PROBABLY BE
DOING IT.
YOU SHOULD BE INVESTIGATING
MODEL FIT, BUT YOU WON'T ALWAYS
BE SPECIFICALLY STATED THAT WAS
DONE HERE.
I WOULD SAY, ESPECIALLY WHEN IT
IS INTUITIVE TO DO SO,
PRESENTATION MIGHT BE HELPFUL.
IF THE MODEL IS LONG, WHICH IN
THIS CASE IT IS NOT, YOU CAN
ALSO INCLUDE A TABLE OF THE
ESTIMATES AND THE STANDARD
ERRORS AND REFER TO IT, VERSUS
IT ALL WRITTEN OUT IN TEXT.
BUT WE WILL GET TO THAT, TOO.
BUT IN SOME CASES A FIGURE MAY
ALSO BE HELPFUL WITH THE MODEL
FIT ATTACHED.
AND AGAIN, HERE I'M SHOWING THE
ESTIMATE AND ERROR.
YOU CAN ALSO SHOW CONFIDENCE
INTERVALS IF YOU LIKE.
BUT SOME MEASURE OF VARIABLES.
AND CONFIDENCE INTERVALS CAN BE
EXTRACTED FROM THIS DATA.
SO IN OUR ADDED COVARIANT
EXAMPLE, WE HAVE MORE COVARIANTS
TO TALK ABOUT, WE WOULD
ENUMERATE ALL OF THOSE THINGS IN
THE METHOD, A LINEAR REGRESSION
WAS PREFORMED TO LOOK AT THE AGE
IN YEARS AND THE MAXIMUM HEART
RATE BY PATIENTS, OIDATIONAL
COVARIANCES WERE FASTING BLOOD
SUGAR, AND GREATER OR LESS THAN
120 MILLIGRAMS PER DECILITER.
AND CHOLESTEROL, CONTINUOUS.
I GUESS, THAT WOULD BE IMPLIED
BY THE WAY I WROTE THAT.
AND ST SLOPE TYPE.
, AND MODEL CHECK S WAS FORMED.
I DIDN'T SHOW THAT ON THE
PRESENTATION, BUT I DID IT.
SO IN THE RESULTS WE WOULD WRITE
LINEAR REGRESSION SHOWED THAT
AFTER CONTROLLING FOR OTHER
VARIABLES THE HANE WAS
SIGNIFICANTLY RELATE TO MAXIMUM
HEART RATE ACHIEVED WITH DECLINE
OF .86, NEGATIVE SCHLEP,
STANDARD ERROR INCLUDED, FOR
EVERY YEAR IN PATIENT AGE.
ST SLOPE WAS SIGNIFICANTLY
RELATED TO HEART RATE.
THIS IS WHERE I'M PULLING IN THE
OTHER TABLE THAT I SHOWED.
IT MAKES IT NICER TO WRITE.
SO ST SLOPE WAS RELATED TO THE
HEART RATE.
AND THEN, WE CAN GO ON TO SAY,
SPECIFICALLY PATIENTS WITH AN
UPSLOPING ST SEGMENT SHOWED 18.8
BEATS HIGHER HEART RATE, FROM
THIS GUY, THEN THOSE WITH FLAT
SEGMENTS ON AVERAGE.
AND, AGAIN, INCLUDING THE
STANDARD ERROR.
AND THE P-VALUE.
SPF AND CHOLESTEROL WERE NOT
SIGNIFICANTLY RELATED TO HEART
RATE.
INVESTIGATIONS OF RESIDUAL
DISTRIBUTION AND BEHAVIOR
INDICATED A RELATIVELY NORMAL
DISTRIBUTION.
THEN FOR THE INTERACTION EXAMPLE
THAT WE RAN THROUGH, AGAIN, WE
WANT TO JUST BE CLEAR HOW WERE
SPECIFYING THE PIECES OF THE
MODEL AND INCLUDED THE
INTERACTION TERM.
SO WE WOULD SAY TO INVESTIGATION
WHETHER THIS RELATIONSHIP VARIES
BY HEART DISEASE DIAGNOSES AN
INVESTIGATION TERM FOR HEART
DISEASE WAS ALSO INCLUDED IN THE
MODEL.
AND WE WOULD REPORT THE RESULTS
AS FOLLOWS.
LINEAR REGRESSION SHOWED THAT
THE INTERACTION BETWEEN AGE AND
HEART DISEASE WAS SIGNIFICANT
FOR PREDICTING HEART RATE.
AND FIRST, I'M CHOOSING TO
REPORT THE ACTUAL ESTIMATED
CHANGE IN SLOPE.
THIS IS THE FIRST PIECE THAT
TELLS US THAT THE SLOPE, THE
INTERACTION IS SIGNIFICANT.
THEN I CAN SAY, SPECIFICALLY
WHILE INDIVIDUALS WITH HEART
DISEASE SHOWED NO RELATIONSHIP
BETWEEN AGE AND HEART RATE,
REPORTING THAT NONSIGNIFICANT
SLOPE HERE, FROM EITHER YOUR
CALCULATION OR THE ONE THAT YOU
CAN EXTRACT FROM THE SOFTWARE.
INDIVIDUALS WITHOUT HEART
DISEASE SHOWED A SIGNIFICANT
DECLINE OF 1.05 BEATS PER MINUTE
PER YEAR OF AGING.
AND REPORTING THAT SLOPE FOR
THAT GROUP.
SO AGAIN REPORTING EACH SLOPE
SECH RATTLY FOR GROUP.
AND INVESTIGATES SHOWED A NORMAL
DISTRIBUTION.
I WOULD SAY IN INTERACTION
CASES, FIGURE IS USUALLY VERY
USEFUL FOR HELPING PEOPLE
UNDERSTAND.
I MEAN, EVEN, I EVEN WISH I HAD
IT HERE, EVEN JUST TO
DEMONSTRATE THE SLOPES CAN BE A
LOT EASIER TO SEE THE DATA AND
UNDERSTAND WHAT WE'RE TALKING
ABOUT.
THEN JUST READING THE NUMBERS.
SO, I WOULD ALWAYS ADVOCATE FOR
USING FIGURES WHEN POSSIBLE.
SO NOW, JUST TO WALK THROUGH
SOME OTHER COMMON TESTS THAT
HAVE A RELATIONSHIP OR HAVE
QUESTIONS OF RELATIONSHIPS TO
REGRESSION.
STARTING WITH CORRELATION.
SO THIS COMES UP A LOT WHERE
PEOPLE ARE CONFUSED ABOUT
WHETHER THEY WANT TO USE A
CORRELATION OR A REGRESSION.
SO FOR CORRELATION, WE'RE
PRIMARILY INTERESTED IN THE
STRENGTH AND DIRECTION OF THE
RELATIONSHIP IN A COMMINATIVE
WAY, NOT REALLY IN TERMS OF ONE
PREDICTING THE OTHER.
MAYBE WE JUST WANT TO KNOW IF
THEY ARE CORRELATED WITH EACH
OTHER.
AND AGAIN, THIS WOULD HAVE TO BE
BOTH VARIABLES MUST BE
CONTINUOUS, WE WOULD ONLY BE
INVESTIGATING TWO VARIABLES.
YOU CAN OBVIOUSLY DO
CORRELATIONS IN MANY PAIRS OF
VARIABLES, BUT THIS WOULD ONLY
ANSWER THE QUESTION ABOUT TWO AT
A TIME.
T-TESTS ARE EQUIVALENT TO
REGRESSION WHEN WE HAVE A SINGLE
BINARY INDEPENDENT VARIABLE.
SO MAYBE THIS DOESN'T SEEM LIKE
A QUESTION ANYBODY WOULD ASK.
BUT IN A SENSE WHERE PERHAPS YOU
DO HAVE TWO GROUPS AND ONE
CONTINUOUS MEASURE AND YOU WANT
TO KNOW IF IT IS DIFFERENT FOR
EACH OF YOUR GROUPS, YOU MIGHT
JUST THINK BY DEFAULT TO RUN A
T-TEST.
IF YOU THINK THAT EVENTUALLY
YOU'RE GOING TO WANT TO RUN
REGRESSION AND CONTROL FOR OTHER
VARIABLES IN THERE, YOU SHOULD
PROBABLY JUST PUT YOURSELF IN A
REGRESSION FRAMEWORK FROM THE
BEGINNING.
SO IF YOU'RE ONLY REALLY
INTERESTED IN THE TWO VARIABLES
TOGETHER.
A SIMPLE T-TEST IS FINE.
IF YOU THINK YOU'RE USING THAT
AND WANT TO BUILD ON IT OR ADD
INTERACTION TERMS AND ADD SORT
COVARIANTS OR POTENTIAL
CONFOUNDING FACTORS THEN MAYBE
WE JUST WANT TO BE IN A
REGRESSION FRAMEWORK FROM THE
START.
AND LASTLY, IS ANOVA, AND I
GUESS, WHAT I WANT TO SAY ABOUT
THAT, IS BASICALLY THAT ANOVA IS
A SPECIAL CASE OF LINEAR
REGRESSION.
THEY ARE REALLY THE SAME.
THEY ARE DOING THE SAME THING.
IN ANOVA, THE INDEPENDENT
VARIABLE IS, CAN ONLY BE
CATEGORICAL.
AND IN ALL OTHER CASES YOU'RE
BASICALLY DOING REGRESSION.
SO IF YOU'RE GOING TO LEARN HOW
TO DO ANYTHING, I WOULD
RECOMMEND UNDERSTANDING
REGRESSION.
BECAUSE YOU CAN RUN ANOVAS WHEN
YOU UNDERSTAND REGRESSION.
WHEN YOU LEARN A95 OFFER, YOU
ONLY KNOW HOW TO DO ANOVA.
SO IT IS NORTHWESTERLY
GENERALIZABLE AND MORE FLEXIBLE
TO UNDERSTAND REGRESSION
FORMALLY, LIKE I SAID, ANOVA IS
JUST A SPECIAL CASE OF LINEAR
REGRESSION.
AND WE HAVE, WELL I GUESS, I
WOULD CALL EXTENSIONS OF
REGRESSION LOGISTIC REGRESSION
WOULD USE A BINARY OUTCOME
MEASURE.
AND WE'LL BE TALKING ABOUT THAT
IN THE FUTURE LECTURE FOR THIS
SERIES.
POISSON REGRESSION IS USING
ACCOUNT TOUT COME MEASURE.
SO, POSITIVE WHOLE NUMBERS.
COX REGRESSION USING SURVIVAL
OUTCOME MEASURES.
AND THEN LINEAR MIXED MODELS
WHICH IS BASICALLY REGRESSION
WITH INTERCORRELATED DATA.
SO MAYBE WE HAVE REPEATED
MEASURES OR TIME OR CLUSTERED
DATA OR LONGITUDINAL DATA SO A
DIFFERENT TYPE OF MODEL WOULD BE
USED TO ANSWER QUESTIONS FOR
OUTCOME MEASURES OF THAT TYPE.
SO IN SUMMARY, LINEAR REGRESSION
IS A USEFUL AND FLEXIBLE WAY TO
UNDERSTAND THE PREDICTIVE, BUT
NOT CAUSAL, BEHAVIOR BETWEEN ONE
OR MORE VARIABLES IN A
CONTINUOUS OUTCOME MEASURE.
AND AS WE DISCUSSED, YOU MUST
MEET CERTAIN ASSUMPTIONS FOR THE
MODEL TO BE CONSIDERED
APPROPRIATE TO USE.
WE NEED TO CHECK THOSE
ASSUMPTIONS EITHER SOMETIMES AT
THE START BY UNDERSTANDING OUR
DESIGN WHETHER WE HAVE
INDEPENDENCE.
AND THE BEHAVIOR OF IF WE HAVE A
LINEAR BEHAVIOR TO DESCRIBE, BUT
ALSO WE CHECK ASSUMPTIONS AFTER
RUNNING THE MODEL WHICH IS --
WHEN WE ABSTAIN RESIDUALS FROM
OUR RUN MODEL ARE THEY BEHAVING
IN A WAY THAT WE SEE ASSUMPTIONS
OF REGRESSION, WHICH IS THE
NORMAL DISTRIBUTION OF
RESIDUALS.
ADDITIONAL VARIABLES CAN BE
ADDED AS NEEDED TO ELABORATE ON
A RELATIONSHIP BETWEEN, YOU
KNOW, X AND Y OR INVESTIGATE OUR
ACTIONS OR ADDRESS CONFOUNDING
BEHAVIORS.
SO THIS IS OBVIOUSLY INCREASE IN
COMPLEXITY VERY QUICKLY.
VISUAL-- I THINK BECAUSE OF
THAT, VISUAL INSPECTIONS OF THE
DATA ARE REALLY KEY TO
UNDERSTANDING THE DATA OVERALL.
LOOKING AT RESIDUAL BEHAVIOR.
UNDERSTANDING DISTRIBUTION,
VARIABILITY, MODEL PERFORMANCE.
YOU NEED TO SEE YOUR DATA TO
REALLY UNDERSTAND IT.
SO DON'T BE AFRAID TO MAKE THE
VISUALIZATIONS.
AND DATA REPORTING SHOULD
INCLUDE INFORMATION ON MOST OR
ALL MODELING INVESTIGATED DURING
THE ANALYTICAL PROCESS.
ESPECIALLY IF IT IS EXPLORATORY,
IT SHOULD BE AS REPRODUCIBLE AS
POSSIBLE IN TERMS OF THE THINGS
THAT YOU TRIED AND WHAT FAILED.
AND REPORTING AS MUCH AS YOU CAN
OF THAT IN THE PUBLISHED
LITERATURE.
AND I WANT TO CONCLUDE BY
TALKING ABOUT THIS QUOTE FROM
STATISTICIAN GEORGE BOX, OF BOX
COX TRANSFORMATION, IF YOU HEARD
OF SUCH A THING.
HE ATTRIBUTED TO SAYING
SOMETHING LIKE ALL MODELS ARE
WRONG, BUT SOME ARE USEFUL.
THIS IS ORIGINALLY EXTRAP A
LOTTED FROM SOMETHING HE WROTE
ABOUT IN 1976 IN JAZZA PAPER,
CALLED SCIENCE AND STATISTICS.
HE WROTE ABOUT THIS CONCEPT IN
TWO PARTICULAR PASSAGES.
I JUST WANT TO READ THEM HERE.
SO ABOUT PARSIMONY, HE WRITES
THIS ALL MODELS ARE WRONG,
SCIENTISTS CANNOT OBTAIN A
CORRECT ONE, BY EXCESSIVE
ELABORATION.
ON THE CONTRARY, HE WOULD SEEK A
DESCRIPTION OF NATURAL
PHENOMENA, TO HAVE SIMPLE,
MODELS IS THE SIGNATURE OF A
GREAT SCIENTIST, OVERELABORATION
IS OFTEN THE MARK AT
MERITOCRACY.
AND WORRYING SELECTIVELY.
HE SAYS SINCE ALL MODALS ARE
WRONG, THE SCIENTIST MUST BE
ALERT TO WHAT IS APPROPRIATELY
WRONG.
IT IS INAPPROPRIATE TO BE
CONCERNED ABOUT MICE WHEN THERE
ARE TIGERS ABROAD.
THIS IS OVERLY DRAMATIC.
BUT NOT INCLUDING EVERY
VARIABLE, NOT HAVING PERFECT
MODEL FIT, BECAUSE IT REALLY
OVER EMPHASIZES HOW MUCH WE
SHOULD BELIEVE THE MODELS
ANYWAY.
WE SHOULD BE IF THE MODEL IS
ELIMINATING, LEARNING SOMETHING
FROM IT, AND GOOD ENOUGH FOR
THIS PARTICULAR APPLICATION AND
THIS PARTICULAR COHORT FOR OUR
PARTICULAR GOALS.
AND MODEL FIT IS IMPORTANT IN
THE SENSE THAT DO WE WILL
UNDERSTAND THE LIMITATIONS OF
THE MODEL AND WHERE WE MIGHT
POSSIBLY BE FAILING.
I THINK THAT'S BROADLY MORE
IMPORTANT HAS YOU GO THROUGH THE
MODELING PROCESS AND LEARN TO DO
THESE THINGS AND REGRESSION AND
HONESTLY OTHER THINGS.
I THINK THIS IS AN INTERESTING
AND USEFUL QUOTE TO KEEP IN MIND
AS YOU DO SCIENCE.
ANY QUESTIONS IN THE LAST-MINUTE
OR TWO?
FEEL FREE TO PUT THEM IN THE
CHAT.
IF YOU HAVE OTHER QUESTIONS HOAR
YOU LIKE TO SPEAK FURTHER I'M
ALWAYS AVAILABLE TO BE EMAILED
AS WELL.
ALL RIGHT.
I DON'T SEE ANY QUESTIONS.
THANK YOU SO MUCH FOR JOINING,
ALL.
LIKE I SAID, PLEASE REACH OUT IF
YOU HAVE FURTHER QUESTIONS.
AND THE RECORDING WILL BE
AVAILABLE AND SLIDES WILL BE
DISSEMINATED AT SOME POINT. 1742 00:58:31,808 IF YOU'RE INTERESTED IN THAT.