>> GOOD MORNING, EVERYONE.
WELCOME TO OUR CTU STATISTICS
LECTURE.
MY NAME IS TIANXIA WU.
I WILL PRESENT LOGISTIC
REGRESSION ANALYSIS.
FIRST I WILL INTRODUCE
REGRESSION ANALYSIS, ODDS AND
ODDS RATIO AND LOGISTIC
REGRESSION MODEL.
THEN WE WILL DISCUSS THE
ASSUMPTIONS, MODEL EVALUATION
AND DIAGNOSTICS.
AND LATER I WILL PRESENT TWO
EXAMPLES OF LOGISTICAL
REGRESSION ANALYSIS.
THE MAIN REFERENCES OF THIS
LECTURE ARE DR. ALISON'S BOOK
LOGISTIC REGRESSION USING SAS
AND SA/STAT 14.2 USERS GUIDE.
IN THE PREVIOUS LECTURE, GINA
INTRODUCED LINEAR REGRESSION.
WHAT IS THE DIFFERENCE BETWEEN
LINEAR AND LOGISTIC REGRESSION
AND WHAT IS IT USED FOR?
TO ANSWER THESE QUESTIONS WE
NEED TO START FROM THE TYPE.
BASED ON THE MEASUREMENTS THERE
ARE TWO TYPES OF VARIABLES.
ONE IS CALLED QUANTITATIVE
VARIABLE.
A QUANTITATIVE VARIABLE CAN BE
CONTINUOUS.
TAKE ANY VALUE IN AN INTERVAL.
FOR EXAMPLE, HEIGHT AND WEIGHT.
A QUANTITATIVE VARIABLE CAN BE
DISCRETE.
WHICH ONLY TAKES SPECIFIC
NUMERICAL VALUES.
BUT THOSE NUMERICAL VALUES HAVE
A CLEAR QUANTITATIVE
INTERPRETATION.
FOR EXAMPLE, THE NUMBER OF
DOCTORS VISIT.
QUANTITATIVE VARIABLES INCLUDE
CATEGORICAL OR NOMINAL.
BINARY AND ORDINAL.
CATEGORICAL VARIABLE INCLUDES
TWO OR MORE CATEGORIES.
BUT THERE'S NO INTRINSIC
ORDERING TO THE CATEGORIES.
FOR EXAMPLE, RISK AND COLORS.
IT INCLUDES ONLY TWO CATEGORIES.
WHICH IS CALLED BINARY WITH TWO
CATEGORIES.
ORDINARY CATEGORY IS SIMILAR.
THE ONLY DIFFERENCE IS ORDINAL
HAS A CLEAR ORDERING OF THE
CATEGORIES.
FOR EXAMPLE, THE PAIN SCALE.
NO PAIN, MILD, MODERATE AND
SEVERE.
BASED ON A STUDY OBJECTIVE
DESIGN, A VARIABLE CAN BE
DEPENDENT OR INDEPENDENT.
THE DEPENDENT VARIABLE IS ALSO
CALLED RESPONSE VARIABLE.
THE INDEPENDENT VARIABLES
INCLUDE EXPLANATORY VARIABLES,
EXPOSURE OR FACTOR.
FOR EXAMPLE, A STUDY IS
DESIGNED TO EVALUATE DIABETES
WITH DIET, EXERCISE.
IN THIS EXAMPLE THE DIABETES IS
AN INDEPENDENT VARIABLE, THE
DIET EXERCISE AND SWEETS ARE
INDEPENDENT VARIABLES.
IN ORDER TO KNOW THE DIFFERENCE
BETWEEN LOGISTIC AND LINEAR
REGRESSION WE NEED TO TALK
ABOUT THE REGRESSION ANALYSIS.
REGRESSION ANALYSIS IS
STATISTIC TOOL TO INVESTIGATING
FUNCTIONAL RELATIONSHIPS
BETWEEN DEPENDENT VARIABLES AND
INDEPENDENT VARIABLES.
THE REGRESSION FAMILY INCLUDES
MANY MEMBERS.
WHICH ONE SHOULD BE USED IS
MAINLY BASED ON TYPES OF
DEPENDENT VARIABLES.
FOR THE QUANTITATIVE DEPENDENT
VARIABLE FOLLOWING DISTRIBUTION
WE USE LINEAR.
DISTRIBUTION WE USE POISSON
REGRESSION.
FOR QUALITATIVE DEPENDENT
VARIABLE WE USE LOGISTIC
REGRESSION.
FOR THE BINARY DEPENDENT WE USE
BINARY LOGISTIC REGRESSION,
ALSO CALLED LOGISTICAL
REGRESSION FOR SHORT.
FOR THE ORDINAL DEPENDENT
VARIABLE WE USE ORDINAL
LOGISTIC REGRESSION.
FOR NOMINAL WE USE MULTINOMIAL
LOGISTIC REGRESSION.
FOR THIS WE WILL TALK ABOUT
BINARY.
AND THERE ARE OTHER REGRESSIONS.
TO APPRECIATE YOU HAVE TO
UNDERSTAND THE DEFINITION OF
PROBABILITY.
THERE ARE TWO POSSIBLE VALUES.
USUALLY Y TAKES 1 IF THE EVENT
OCCURS AND Y TAKES 0 IF THE
EVENT DOES NOT OCCUR.
THE P REPRESENTS THE
PROBABILITY THAT THE EVENT
OCCURS.
THE ODDS OF AN EVENT IS DEFINED
AS THE RATIO OF PROBABILITY OF
AN EVENT OCCURRING TO THE
PROBABILITY OF AN EVENT NOT
OCCURRING.
OR THE P DIVIDED BY 1 -P.
IN OTHER WORDS DEFINED AS RATIO
HOW LIKELY THE EVENT IS TO
OCCUR, TO HOW LIKELY IT IS NOT
TO OCCUR.
SO WHY DO WE NEED ODDS?
IT IS BECAUSE IT IS MORE
SENSIBLE SKILL FOR
MULTIPLICATIVE COMPARISONS.
FOR EXAMPLE, THE PROBABILITY TO
WIN THE NEXT ELECTION FOR
CANDIDATE A IS 0.3, AND FOR B
THE PROBABILITY IS 0.6.
IT IS A MEANINGFUL TO CLAIM THE
PROBABILITY FOR B IS TWICE AS
GREAT AS A'S.
HOWEVER, IF P EQUAL TO 0.6 FOR
CANDIDATE A, THE B'S
PROBABILITY CANNOT BE TWICE AS
GREAT AS A.
BECAUSE THE PROBABILITY CANNOT
BE MORE THAN 1.
BUT IN ODDS SCALE FOR P0.6 FOR
CANDIDATE A AND WE CAN GET THE
ODDS EQUAL TO 0.6 DIVIDED BY
0.4 EQUAL TO 1.5.
FOR P, IF THE PROBABILITY IS
0.75, FOR B WE CAN GET
0.75/0.25 EQUALS 3, WE CAN SEE
THE ODDS ARE TWICE AS GREAT AS
A.
0.75 IS IT SUB FROM THIS
EQUATION.
THE ODDS RATIO IS TO COMPARE
ODDS.
FOR EXAMPLE, THE ODDS RATIO OF
A TO B IS EQUAL TO 1.5 DIVIDED
BY 3, EQUAL TO 0.5.
INDICATING THE ODDS OF WINNING
THE ELECTION FOR CANDIDATE A IS
50% LOWER THAN THAT FOR
CANDIDATE B.
AND ODDS RATIO OF B TO A IS
EQUAL TO 3 DIVIDED BY 1.5 EQUAL
TO 2, INDICATING THE ODDS OF
WINNING THE ELECTION FOR B IS
TWO TIMES THAT FOR A.
NOW WE COME TO DEFINE THE LOGIT
MODEL.
OR LOGISTICAL REGRESSION MODEL.
WE JUST LEARNED ODDS DEFINED AS
PROBABILITY DIVIDED BY ONE
MINUS PROBABILITY.
THEN P DIVIDED BY 1 MINUS
P APPLY NATURAL LOGARITHM
TRANSFORMATION TO THE ODDS.
THEN WE GET THE LOGIT P.
THIS TABLE SHOWS THREE
VARIABLES FOR THE PROBABILITY
DERIVED FROM 0 TO 1.
THE ODDS RANGE IS FROM 0 TO
POSITIVE LIMIT, WHICH MEANS NO
UPPER BOND.
AND LOGIT THERE IS NO UPPER OR
LOWER BONDS.
IT TAKES ALL REAL NUMBERS.
THIS TABLE ALSO SHOWS
ONE-TO-ONE RELATIONSHIP BETWEEN
THE THREE VARIABLES.
DIFFERENT SCALES.
FOR EXAMPLE, THE PROBABILITY OF
0.5 CORRESPONDING TO ODDS OF 1
AND LOGIT OF 0.
LET'S LOOK AT THIS AGAIN.
FOR THE BINARY VARIABLE WE USE
PROBABILITY TO DESCRIBE THE
EVENTS OCCURRING.
AND THEN WE DEFINE THE ODDS AS
P DIVIDED 1 MINUS P.
AND THEN WE APPLY THE LOG
TRANSFORMATION.
WE GET THE LOGIT.
THIS TRANSFORMATION LEADS TO A
LINEAR RELATIONSHIP WITH THE
PREDICTOR VARIABLES, OR
INDEPENDENT VARIABLES.
THE LOGISTIC REGRESSION MODEL
IS LIKE THIS.
WHICH IS VERY SIMILAR TO THE
LINEAR REGRESSION.
IN THE LINEAR REGRESSION THE
LEFT SIDE IS RESPONSIVE
VARIABLE.
LOGISTIC REGRESSION IS THE
LOGIT, IS THE LOG
TRANSFORMATION OF THE ODDS.
AND FOR THE RIGHT SIDE.
ALL THE X ARE SAME AS IN THE
LINEAR REGRESSION MODEL.
WHICH CAN TAKE ANY TYPE
VARIABLE.
SO X CAN BE QUANTITATIVE OR
QUALITATIVE.
AND FOR THE BETA VARIABLE, THE
BETA AND EITHERS ARE THE SLOPE.
IN THE LINEAR REGRESSION THE
SLOPE CAN BE INTERPRETED AS THE
CHANGE IN RESPONSE VARIABLE FOR
EACH UNIT INCREASE IN X.
BUT LOGISTIC REGRESSION THE
SLOPE BETA IS THE CHANGE IN LOG
ODDS RATIO.
FOR EACH UNIT INCREASE IN
INDEPENDENT VARIABLE OR XI.
BECAUSE THE LOG ODDS RATIO HAS
NO DIRECT MEANING, THEREFORE WE
BACK, THE EXPONENTIAL SLOPE.
THE EXPONENTIAL SLOPE IS THE
CHANGE IN ODDS RATIO FOR EACH
UNIT INCREASE IN THE X.
WHICH WE WILL SHOW IN DETAIL IN
THE EXAMPLES.
SO WHAT IS LOGISTIC REGRESSION
USED FOR.
BECAUSE LOGISTIC REGRESSION
MODELS ARE LINEAR REGRESSION OF
INDEPENDENT VARIABLES WITH
NATURAL LOG OF THE ODDS OF
DEPENDENT VARIABLE.
THEREFORE IT COULD BE USED TO
EVALUATE THE ASSOCIATION OF ONE
OR MORE INDEPENDENT VARIABLE,
WITH BINARY DEPENDENT VARIABLE.
AND TO STUDY THE RELATIONSHIP
BETWEEN EACH VARIABLE AND THE
BINARY VARIABLES WHILE HOLDING
CONSTANT THE VALUES OF THE
OTHER INDEPENDENT VARIABLES.
OR ADJUSTED FOR OTHER DEPENDENT
VARIABLES.
AND TO ESTIMATE THE PROBABILITY
OF A PARTICULAR OUTCOME GIVEN
THE VALUES OF THE INDEPENDENT
VARIABLES OR PREDICTION.
THERE'S ONLY ONE INDEPENDENT
VARIABLE.
THE LOGISTICAL REGRESSION IS
CALLED SIMPLE LOGISTIC
REGRESSION.
THE ODDS RATIO BASED ON THESE
SIMPLE LOGISTIC REGRESSION IS
CALLED UNADJUSTED ODDS RATIO.
IF THE MODEL INCLUDE MORE THAN
ONE INDEPENDENT VARIABLE WE
CALL MULTIPLE LOGISTIC
REGRESSION.
THE ODDS RATIO IS ESTIMATED
FROM THE MULTIPLE LOGISTIC
REGRESSION IS CALLED ADJUSTED
ODDS RATIO.
WHICH REPRESENTS THE UNIQUE
CONTRIBUTION OF THE INDEPENDENT
VARIABLES AFTER ADJUSTING FOR
THE OTHER EFFECTS, ADJUSTING
FOR THE OTHER VARIABLES IN THE
MODEL.
THE ADJUSTED ODDS RATIO IS
OFTEN LOWER THAN THE
CORRESPONDING UNADJUSTED ONE.
JUST LIKE THE LINEAR
REGRESSION, LOGISTIC REGRESSION
SHOULD ALSO MEET SOME BASIC
ASSUMPTIONS.
THE FOUR BASIC ASSUMPTIONS IN
LINEAR REGRESSION ALSO APPLY TO
LOGISTIC REGRESSION.
THE FIRST ONE IS INDEPENDENT
OBSERVATIONS.
WHICH MEANS THE SUBJECTS ARE
INDEPENDENT FOR EACH OTHER.
AND THERE'S ONLY ONE
OBSERVATION FROM EACH SUBJECT.
WHICH MEANS THE DESIGN, THE
DATASET CANNOT BE LONGITUDINAL
AND SHOULD BE CROSS SECTIONAL,
THE SAME IN THE LINEAR
REGRESSION.
THE SECOND ONE IS
MULTICOLLINEARITY.
THIS MEANS THE INDEPENDENT
VARIABLES SHOULD NOT BE HIGHLY
CORRELATED WITH EACH OTHER.
TO CHECK THIS ASSUMPTION THERE
ARE TWO METHODS.
ONE IS TO RUN PEARSON
CORRELATION ANALYSIS FOR ALL
INDEPENDENT VARIABLES.
ANY PAIR WITH COEFFICIENT
GREATER THAN 0.8 INDICATING
MULTICOLLINEARITY.
AND ONE SHOULD BE EXCLUDED FROM
THE MODEL.
THE SECOND METHOD IS RUN LINEAR
REGRESSION BY TREATING BINARY
OUTCOME 0, 1 AS CONTINUOUS TO
GET THE VARIANCE INFLATION
FACTOR.
THE LINEAR MODEL INCLUDES ALL
INDEPENDENT VARIABLES.
IF ANY INDEPENDENT VARIABLE ARE
CATEGORICAL WITH MORE THAN TWO
CATEGORIES, YOU NEED TO RECORD
IT AS MORE THAN TWO --
VARIABLES.
FOR THE VIF GREATER THAN 4
INDICATES POSSIBLE MULTICO
LINEARITY GREATER THAN 10.
THE THIRD ONE IS THE LINEAR FOR
CONTINUOUS INDEPENDENT
VARIABLES.
THIS MEANS THERE'S A LINEAR
RELATIONSHIP BETWEEN LOGIT P
AND THE CONTINUOUS X.
WE USE PLOT OF YX TO CHECK THE
LINEARITY.
THIS DOESN'T WORK IN LOGISTIC
REGRESSION.
BECAUSE THE DEPENDENT VARIABLE
Y HAS ONLY TWO POSSIBLE VALUES.
SO WE USE THE BOX-TIDWELL TEST.
WHICH MEANS TO TEST THE
INTERACTION TERM X AND LOG X.
FOR EXAMPLE, AGE IS A
CONTINUOUS VARIABLE.
AND WE NEED, WE CAN TEST THE
AGE, THE INTENTION BETWEEN AGE
AND THE LOG AGE.
IF THE P VALUE IS LESS THAN
ONE, INDICATING THE ASSUMPTION
IS VIOLATED.
THE ONE SOLUTION IS TO
CATEGORIZE THE CONTINUOUS
VARIABLE.
AND THEN TREAT IT AS
CATEGORICAL VARIABLE, OR USE
PIECEWISE LINEARIZATION.
THIS WILL BE SHOWN IN THE
EXAMPLES.
THE FOURTH ONE IS NO
INFLUENTIAL VALUES WHICH COULD
BE CHECKED BY USING DIAGNOSTIC
WHICH I WILL BE SHOWING IN THE
NEXT SLIDE.
MODEL EVALUATION.
THIS SLIDE SHOWS FOR MODEL
EVALUATION IS TO TEST HOW WELL
THE MODEL FITS THE DATA.
IT IS ALSO CALLED THE GOODNESS
OF FIT TEST, WHICH IS TO
COMPARE THE OBSERVED
PROBABILITY TO EXPECTED OR
PREDICTED PROBABILITY.
THERE ARE A LOT OF METHODS FOR
THE MODEL EVALUATION.
HERE WE INTRODUCE THREE OF THEM.
ONE IS CALLED HOSMER AND
LEMESHOW TEST, OR HL TEST.
THE HIGH P VALUE INDICATES THAT
THE MODEL THAT IS A FITTED
MODEL CANNOT BE REJECTED.
AND THE MODEL CANNOT BE
SIGNIFICANTLY IMPROVED BY
ADDING NON-LINEARITIES OR
INTERACTION.
AND THE LOW P VALUE INDICATES A
MODEL DOES NOT FIT THAT WELL,
OR LACK OF FIT.
AND THE MODEL CAN BE
SIGNIFICANTLY IMPROVED BY
ADDING NON-LINEARITIES AND/OR
INTERACTION.
THE SECOND TEST METHOD IS
DEVIANCE AND PEARSON GOODNESS
OF FIT STATISTICS.
THE THIRD ONE IS GENERALIZED
R-SQUARE, WHICH IS MEASURES OF
PREDICTIVE POWER.
IN THE LINEAR REGRESSION, THE
R-SQUARE CAN BE INTERPRETED AS
THE PROPORTION OF BY
INDEPENDENT VARIABLES.
BUT THE GENERALIZED R-SQUARE
CANNOT BE INTERPRETED IN THIS
WAY.
BUT STILL, WE CAN USE TO
COMPARE DIFFERENT MODELS.
DIAGNOSTICS.
THE PURPOSE OF DIAGNOSTICS IS
TO IDENTIFY THE INFLUENTIAL
OBSERVATIONS OUTLIERS, EXTREME
VALUES.
THE RESIDUAL IS DEFINED AS THE
DIFFERENCE BETWEEN THE OBSERVED
PROBABILITY AND IS THE
PREDICTED PROBABILITY.
THE FOLLOWING FOUR STATISTICS
ARE OFTEN USED AND ARE USUALLY
ARE PRESENTED IN PLOTS.
ONE IS THE PEARSON RESIDUALS.
THE POSSIBILITY INFLUENTIAL
OBSERVATIONS ARE THOSE WITH
ABSOLUTE VALUE OF PEARSON
RESIDUAL LESS THAN 2.
THE SECOND IS DEVIANCE
RESIDUALS.
THE POSSIBLE INFLUENTIAL
OBSERVATIONS ARE THOSE WITH
ABSOLUTE VALUE OF 2.
BOTH PEARSON AND THE DEVIANCE
RESIDUALS ARE FOLLOW THE
STANDARDIZED NON DISTRIBUTION.
THEREFORE THE CUT-OFF FOR
OUTLIER ARE 2.
THE THIRD ONE IS HAT MATRIX
DIAGONAL, OR LEVERAGE.
FOR THIS VALUE, FOR THIS
STATISTICS, THE RANGE IS 0 TO 1.
THE POSSIBLE INFLUENTIAL
OBSERVATIONS ARE THOSE WITH
GREATER THAN 3 TIMES K DIVIDED
BY N.
HERE THE K IS NUMBER OF
PARAMETERS INCLUDING THE
INTERCEPT.
AND N IS THE TOTAL NUMBER OF
OBSERVATIONS.
THE FOURTH ONE IS THE
CONFIDENCE INTERVAL
DISPLACEMENT C.
THE POSSIBLE INFLUENTIAL
OBSERVATIONS ARE THOSE WITH C
STATISTICS GREATER THAN 1.
EVEN THOUGH THEY ARE FOR THESE
STATISTICS, IT IS RECOMMENDED
TO INVESTIGATE CASES FOR THOSE
FOR WHICH THE VALUE IS HIGHER,
HIGH RELATIVE TO THE OTHERS.
THESE SLIDES SHOW THE SCAT PLOT
FOR THE FOUR STATISTICS.
THIS ONE IS FOR PEARSON
RESIDUAL.
YOU CAN SEE THERE ARE TWO
OUTLIERS HERE.
AND THESE TWO OUTLIERS ALSO
SHOWING IN DEVIANCE RESIDUAL,
THIS AND THIS HERE.
AND FOR LEVERAGE, THERE'S ONE
OUTLIER HERE.
AND FOR THE C STATISTICS THERE
ARE FIVE WITH VALUES GREATER
THAN 1.
THIS SLIDE SHOWS A DIFFERENCE
AND SIMILARITIES BETWEEN LINEAR
AND THE LOGISTIC REGRESSION.
FOR THE DEPENDENT VARIABLE,
THAT'S THE MAIN DIFFERENCE.
FOR THE LINEAR REGRESSION
SHOULD BE CONTINUOUS WITH
NORMAL DISTRIBUTION.
AND LOGISTIC REGRESSION IS
BINARY YES OR NO.
AND FOLLOWING BERNOULLI.
IT SHOULD MEET AS FOUR
ASSUMPTIONS.
NO MULTICOLLINEARITY AND LIN
YAIRITY FORTIN YUS X AND Y AND
X LOGIT P AND X ARE LINEAR
RELATIONSHIP.
AND NO INFLUENTIAL VALUES.
FOR THE EFFECT SELECTION OF THE
INDEPENDENT VARIABLE SELECTION,
WE CAN USE STEPWISE MYTH ODD,
FORWARD, BACKWARD, OR
PREDICTIVE POWER.
WHICH MEANS BASICALLY R-SQUARED.
ESTIMATION METHOD PARAMETERS.
IN THE LINEAR REGRESSION WE USE
LEAST SQUARE.
AND LOGISTIC WE USE MAXIMUM
LIKELIHOOD.
AND FOR PREDICTIVE POWER IN THE
LINEAR REGRESSION USE R-SQUARE.
IN LOGISTIC REGRESSION WE USE
GENERALIZED R-SQUARE OR
OPERATING CHARACTERISTIC CURVE.
AUROC.
IN THE RESULT PRESENTATION,
SLOPE SEMI PARTIAL R-SQUARE.
NEXT, I'M GOING TO PRESENT TWO
EXAMPLES OF LOGISTIC REGRESSION.
THE FIRST EXAMPLE IS NEURALGIA
TRIAL.
THIS WAS DESIGNED FOR TREATMENT
EFFECTS BY COMPARING WITH
PLACEBO.
THIS IS A RANDOMIZED CONTROL
TRIAL WITH THREE ARMS.
THE SUBJECTS ARE ELDERLY
PATIENTS WITH NEURALGIA.
SUBJECTS ARE RANDOMLY ASSIGNED
TO RECEIVE DRUG A, B AND A
PLACEBO.
STRATIFY USING 6 AND 8 AS
COVARIATES IS APPLIED.
SAMPLE SIZE IS A TOTAL OF 60,
20 PER GROUP.
RESPONSE VARIABLE IS WHETHER
THE PATIENT REPORTED PAIN OR
NOT, DENOTED AS 1 AND 0.
COVARIATES ARE SEX, AGE AND
DURATION.
THIS TABLE SHOWS PART OF THE
DATA.
THE FIRST COLUMN FOR THE CASE
NUMBER AND THE PAIN AND THE
TREATMENT AND THE SEX AND THE
AGE AND THE DURATION.
WE NEED TO USE SAS PROCEDURE
LOGISTIC.
THE FIRST IS TO CALL THE
PROCEDURE LOGISTIC AND SPECIFY
THE DATA, NEURALGIA.
AND THE SECOND LINE IS TO LIST
ALL THE QUALITATIVE OR
CATEGORICAL INDEPENDENT
VARIABLES.
AND TO SPECIFY THE REFERENCE
LABEL FOR ODDS RATIO.
LIKE HERE WE SPECIFIED THE
REFERENCE LEVEL FOR TREATMENT.
AND FOR SEX, IT'S MALE.
IF YOU DON'T SPECIFY THIS BY
DEFAULT, THE REFERENCE LEVEL IS
THE LAST ORDERED LEVELS.
I SPECIFY THE DIFFERENCE WHAT I
WANT TO USE AS A REFERENCE.
AND THE THIRD IS TO SPECIFY THE
MODEL.
DEPENDENT VARIABLE IS PAIN.
AND THE INDEPENDENT VARIABLES
ARE TREATMENT, AGE, SEX AND
CURE RATION.
AND HERE WE USE PAIN, EVENT
EQUAL TO 1 TO SPECIFY THE
RESPONSE LEVEL TO BE MODELED.
BY DEFAULT, THE PROCEDURE
MODELS THE PROBABILITY OF THE
SMALLEST VALUE.
LIKE HERE, I DON'T SPECIFY 1.
THE PROCEDURE WILL MODEL 0.
HERE LACK FIT H.L. GOODNESS OF
FIT TEST.
AND INFLUENCE DIAGNOSTICS.
TO CALCULATE ODDS RATIO FOR
TREATMENT.
AND THE CONFIDENCE INTERVAL.
HERE IS SPECIFIED CONFIDENCE
INTERVAL EQUAL TO PL IS TO
CALCULATE THE CONFIDENCE
INTERVAL BASED ON THE PROFILE
LIKELIHOOD FUNCTION WHICH IS
MORE ACCURATE THAN WALD METHOD,
ESPECIALLY WHEN THE SAMPLE SIZE
IS SMALL.
TO ANALYZE DATA, WE CANNOT JUST
SIMPLY RUN THE PROGRAM.
WE NEEDED TO CHECK THE
ASSUMPTIONS.
FOR THIS DATA, IF THE DEPENDENT
VARIABLE IS CONTINUOUS, WE
SHOULD USE ANCOVA A SCHUMM
SHUNS FOR COVARIATES.
ANCOVA THE COVARIATE VARIABLES
MUST MEET TWO ASSUMPTIONS.
THE ONE ASSUMPTION IS THE
COVARIATE VARIABLE SHOULD NOT
BE ASSOCIATED WITH THE
TREATMENT GROUP.
BECAUSE THE SIX AND EIGHT ARE
USED AS COVARIATES IN THE
RANDOMIZATION.
NO PROBLEM FOR SEX AND AGE.
THEY ARE PERFECTLY BALANCED.
AND FOR THE DURATION, ALSO VERY
SIMILAR, THE MEANS ARE VERY
SIMILAR.
AND SO THE DURATION NOT
ASSOCIATED WITH TREATMENT.
THIS IS VERY, VERY IMPORTANT.
FOR EXAMPLE, IF THE PATIENT IN
DRUG A GROUP ARE MUCH OLDER
THAN THOSE IN DRUG B GROUP AND
IF THE AGE IS ASSOCIATED WITH
THE PAIN, WE FOUND THE
DIFFERENCE BETWEEN THE TWO
GROUP.
WE WOULD NOT KNOW IF THE
DIFFERENCE WAS CAUSED BY DRUG
OR BY AGE.
IN THIS CASE, THE AGE EFFECT
CANNOT BE ADJUSTED -- CANNOT
BE ANCOVA.
AND IS CONFOUNDED WITH THE AGE
EFFECT IS CONFOUNDED WITH THE
TREATMENT EFFECT.
THIS INDICATING THE STUDY IS
POORLY DESIGNED OR A FAILURE.
THE NEXT IS HOMOGENEITY OF
REGRESSION SLOPES.
THIS MEANS THE SLOPES OF THE
LINEAR REGRESSION, THE SLOPES
OF THE REGRESSION LINE FOR EACH
TREATMENT GROUP SHOULD BE
SIMILAR.
TO TEST THIS ASSUMPTION WE
EVALUATE THE INTERACTION
BETWEEN THE TREATMENT AND EACH
COVARIATE.
IN THIS CASE THE AGE OF
TREATMENT, SEX AND TREATMENT
AND THE DURATION AND THE
TREATMENT.
ALL THE INTERACTIONS WITH P
LESS THAN 0.1.
WHICH MEANS THE TWO ASSUMPTIONS
FIT.
SECOND, WE ARE GOING TO CHECK
THE FOUR ASSUMPTIONS.
BASED ON THE DESIGN, THERE'S NO
PROBLEM FOR THE INDEPENDENT
OBSERVATIONS.
AND FOR THE SECOND ASSUMPTION,
NO MULTICOLINEARITY.
SINCE WE ALREADY KNOW THE
TREATMENT IS NOT ASSOCIATED
WITH THE THREE COVARIATES.
SO WE ONLY NEED TO CHECK THE
AGE, DURATION AND SEX.
AND THEN WE RUN THE PEARSON
CORRELATION AND ALL THREE
CORRELATION COEFFICIENTS ARE
VERY SMALL.
SO THERE'S NO PROBLEM FOR
MULTICOLLINEARITY.
THE LINEAR RELATIONSHIP BETWEEN
THE LOGIT OF PAIN AND AGE
DURATION, BETWEEN THE AGE AND
LOG AGE AND DURATION AND LOG
DURATION.
AND THIS TABLE SHOWS THAT THE
AGE HAS A P VALUE OF LESS THAN
0.01 AND NO PROBLEM WITH
DURATION.
THE FOLLOWING SLIDES WILL SHOW
HOW TO DEAL WITH THIS NON
LINEARITY.
AND THE FOURTH ASSUMPTION IS NO
INFLUENTIAL VALUES WHICH WILL
BE SHOWING IN THE SLIDES FOR
DIAGNOSTICS.
FOR THE CONTINUOUS INDEPENDENT
VARIABLES IN THE INDICATION,
EVEN IF THERE'S NO MORE
DISTRIBUTION ASSUMPTION, BUT WE
NEEDED TO, BUT THERE SHOULD BE
NO OUTLIER, ABSOLUTE VALUES.
WE CAN SIMPLY CALCULATE THE
KURTOSIS AND SKEWNESS FOR EACH
VALUE.
IF IT'S LESS THAN ONE, THERE
WILL BE NO PROBLEM.
THIS SLIDE SHOWS HOW TO DEAL
WITH THE NONLINEARITY.
HERE WE SEE THE FIRST MODEL.
WE JUST USE THE AGE AS
COVARIATES.
AND IGNORE THE NONLINEARITY.
THE DURATION WAS DROPPED FROM
THE MODEL BECAUSE THE P VALUE
IS GREATER THAN 0.9.
AND TO SOLVE THE PROBLEM WE
CATEGORIZE THE CONTINUOUS
VARIABLE AS CATEGORICAL.
THIS TABLE SHOWS TWO CATEGORY
VARIABLE FOR H.
ONE WITH TWO CATEGORY.
USING 70 AS A CUT-OFF.
THE SECOND WAS THREE
CATEGORIES, WITH 68 AND 72 AS
CUT-OFF.
AND FIRST WE CAN TREAT IT AS
CATEGORICAL.
FOR AGE TREAT, THERE WILL BE NO
ASSUMPTION FOR THE LINEARITY.
AND THE MODEL 2, WE USE THE AGE
WITH TWO CATEGORY.
AND THE MODEL INCLUDE HAS FOUR
DEGREES OF FREEDOM.
SO TWO FOR TREATMENT, ONE FOR
SEX AND ONE FOR AGE.
AND MODEL THREE, THE AGE WITH 3
CATEGORY.
AND DEGREES OF FREEDOM IS 2, SO
WE HAVE FIVE DEGREES OF FREEDOM.
AND THE SECOND SOLUTION IS TO
PIECEWISE LINEARIZATION.
THE METHOD IS TO DIVIDE AGE
INTO TWO LINEAR SECTION, LIKE
AGE LESS THAN 70 AND AGE
GREATER THAN 70.
EACH SECTION IS ASSUMED TO HAVE
LINEARITY.
SO THEREFORE WE COME TO THE
MODEL 4 AS A TREATMENT AND SEX,
AND AGE INCLUDE THREE, AGE AS
CONTINUOUS AND AGE 2 WITH 2
CATEGORY AND INTERACTION
BETWEEN AGE AND AGE 2.
SO THIS MODEL HAS TOTAL MODEL
DEGREE WITH SIX.
SO TWO HERE, ONE, ONE, ONE.
AND THEN WE HAVE TEST THE
LINEARITY, USE THE BOX-TIDWELL
TEST.
AND THEN WE FOUND THE P VALUE
IS GREATER THAN 0.1.
THIS TABLE SHOWS JOINT TEST FOR
MODEL 4.
SO THE MODEL INCLUDE AGE, AGE
2, AGE INTERACTION BETWEEN
THESE TWO AND SIX AND TREATMENT.
YOU SEE THE INTERACTION IS
SIGNIFICANT.
THE SIGNIFICANT INTERACTION
INDICATES THAT THE TWO AGE
SECTION HAVE DIFFERENT
RELATIONSHIPS BETWEEN LARGE AND
AGE RATIO.
THIS SLIDE SHOWS COMPARISONS
BETWEEN THE FOUR MODELS.
THE MODEL 1, USE THE AGE AND
CONTINUOUS BUT WITH
NONLINEARITY.
AND MODEL 2, AGE 2 CATEGORY.
FOR THE CATEGORICAL INDEPENDENT
VARIABLE, THERE'S NO
REQUIREMENT FOR THE LINEARITY.
AND THE MODEL 3, 4 AND THE AGE
INCLUDE THE THREE ITEMS.
THIS, HERE SHOWS H.L., GOODNESS
OF FIT TEST P VALUE.
YOU SEE THE MODEL 4 FITS BETTER
THAN THE OTHER THREE.
THIS TABLE, THIS TABLE SHOWS
AGE EFFECT AND THE FOUR MODELS.
FOR MODEL 1 THE AGE RANGE IS
59-83 AND ODDS RATIO 1.21.
AND CONFIDENCE INTERVAL DOESN'T
INCLUDE A 1 WHICH MEANS THE
ODDS RATIO IS SIGNIFICANTLY
DIFFERENT FROM 1.
AND THE 1.21, WHICH MEANS FOR
WHOLE RANGE OF AGE, FOR EACH
YEAR INCREASE, THE ODDS OF PAIN
INCREASED 21%.
AND FOR MODEL 2, THE AGE IS
ALSO SIGNIFICANT.
THE ODDS RATIO ALSO SIGNIFICANT.
FOR AGES 3, NO DIFFERENCE FOR
THIS INTERVAL COMPARED WITH
LESS THAN 68.
BECAUSE INTERVAL DOESN'T
INCLUDE 1.
WHICH MEANS ODDS RATIO IS NOT
SIGNIFICANTLY DIFFERENT FROM 1.
AND FOR THESE TWO COMPARISON
ODDS RATIO ARE SIGNIFICANT.
AND FOR THE MODEL 4, YOU SEE
FOR AGE LESS THAN 70, THE ODDS
RATIO IS 0.88.
EVEN LESS THAN 1.
THE ODDS RATIO COMES INTERVAL
INCLUDES 1.
SO THIS ODDS RATIO IS NOT
SIGNIFICANT.
WHICH MEANS FOR AGE LESS THAN
70, AGE HAS NO EFFECT ON THE
PAIN.
BUT FOR AGE GREATER THAN 70,
THE AGE EFFECT IS SIGNIFICANT.
THIS SLIDE SHOWS DIAGNOSTICS.
BASED ON THE PEARSON RESIDUAL,
THERE ARE TWO OUTLIER.
WHICH IS 12, AND 17.
AND THESE TWO OUTLIER ALSO
SHOWING IN THE DEVIANCE
RESIDUALS.
12, 17.
BASED ON THE LEVERAGE, THERE'S
ONLY ONE OUTLIER.
AND BASED ON THE CI STATISTICS,
THERE ARE FIVE OF THEM GREATER
THAN 1.
AND HERE WE SEE THIS DIAGNOSIS
USUALLY WE PAY MORE ATTENTION
FOR THE CASES SHOWING IN MORE
THAN ONE STATISTICS.
SO THIS SHOWS THE FIVE POSSIBLE
OUTLIERS.
HOW TO HANDLE THIS, FIRST I
JUST SAID WE NEEDED TO PAY MORE
ATTENTION FOR THE OUTLIER OF
THE INFLUENTIAL OBSERVATIONS,
SHOWING MORE THAN ONE
STATISTICS LIKE THESE THREE.
AND TO HANDLE THESE OUTLIERS,
AND THE SOLUTIONS ARE THE FIRST
THE TWO TO CHECK IF THE
INFLUENTIAL OBSERVATIONS ARE
CAUSED BY TECHNICAL ERRORS.
THE SECOND IS TO RUN LOGISTIC
REGRESSION ANALYSIS AGAIN BY
EXCLUDING THE INFLUENTIAL
OBSERVATIONS.
THIS ANALYSIS IS ALSO CALLED
SENSITIVITY ANALYSIS.
AND USUALLY WE REPORT -- POST?
(?) RESULTS.
THIS TABLE SHOWS ODDS RATIO
CALCULATED FROM THE MODEL 4.
AND TO INTERPRET THE ODDS
RATIO, WE CAN INTERPRET ODDS
RATIO LIKE THIS WAY.
FOR EXAMPLE FOR THE TREATMENT A
VERSUS B, THE ODDS RAISH
-- RATIO IS 1.3 BECAUSE IT
INCLUDE 1.
SO WE CAN SEE THERE'S NO
SIGNIFICANT DIFFERENCE BETWEEN
DRUG A AND B.
AFTER ADJUSTING FOR AGE AND SEX.
THE ODDS RATIO FOR TREATMENT A
TO B THE ODDS RATIO IS 0.057
WHICH IS SIGNIFICANT BECAUSE IT
DOESN'T INCLUDE 1.
BECAUSE THE ODDS RATIO IS LESS
THAN 1, WE USUALLY USE 1 MINUS
THIS ONE AND INTERPRET AS LOWER.
LIKE THIS ONE YOU CAN SEE THE
ODDS OF PAIN FOR PATIENTS
TAKING DRUG A ARE 94.3 LOWER
THAN THOSE TAKING PLACEBO.
ADJUSTING FOR AGE AND SEX.
AND FOR SEX HERE, THE ODDS RAISH
-- RATIO IS 4.675.
WE CAN SEE THE ADJUSTED ODDS
RATIO OF PAIN FOR MALE PATIENTS
ARE 4.7 TIMES THE ODDS FOR
FEMALE PATIENTS AFTER
CONTROLLING FOR TREATMENT AND
AGE.
AND FOR AGE LESS THAN 70, AGE
HAD NO EFFECT ON PAIN AFTER
ADJUSTING FOR SEX AND THE
TREATMENT.
AND FOR AGE GREATER THAN 70, WE
CAN SEE FOR THE PATIENTS OVER
70 YEARS OLD, EACH 1 YEAR
INCREASE IN AGE IS ASSOCIATED
WITH 81.5% INCREASE IN THE ODDS
OF HAVING PAIN, ADJUSTING FOR
TREATMENT AND THE SEX.
THE SECOND EXAMPLE IS
INVESTIGATE SIX BIOMARKERS FOR
PREDICTOR CANCER REMISSION.
FOR THIS IS WHETHER OR NOT
CANCER REMISSION OCCURRED.
SEVEN INDEPENDENCE EPT SUBJECTS
AND CONTAINS 6 PREDICTOR OR
INDEPENDENT VARIABLES.
CELL, SMEAR, INFIL, LI, BLAST,
TEMP.
FIRST WE NEED TO CHECK THE
ASSUMPTIONS.
THE FIRST ASSUMPTION OF
INDEPENDENT OBSERVATIONS, WE
DON'T NEED TO CHECK BECAUSE
THIS 27 SUBJECTS ARE
INDEPENDENT.
THE FIRST WE NEEDED TO CHECK
THE MULTICOLLINEARITY.
THIS SHOWS THE PEARSON
CORRELATION FOR ALL SIX
VARIABLES FOR THE PAIRS.
CLEARLY YOU SEE HERE INFIL AND
SMEAR ARE STRONGLY CORRELATED
GREATER THAN 0.8.
FOR THIS PAIR ONE SHOULD BE
EXCLUDED FROM THE ANALYSIS.
THE SECOND METHOD IS TO RUN
LINEAR REGRESSION TO CHECK VIF
BY TREATING REMISSION AS
CONTINUOUS VARIABLE.
AND HERE, BASED ON THE VIF, THE
LAST COLUMN, YOU WILL SEE IF
THESE THREE VARIABLES SHOWING
SEVERE MULTICOLLINEARITY,
BECAUSE INFIL HAS THE LARGEST
V.I.F.
SO WE FIRST DROP THE INFIL.
AND THEN AFTER WE EXCLUDE THE
INFIL, YOU SEE THE VIF VALUES
ARE PERFECT.
EXCEPT 4.
THEREFORE THE INFIL IS DROPPED
FROM THE ANALYSIS.
IF YOU ARE SHOWING THIS, YOU
MIGHT TRY TO DROP THE OTHER ONE.
BECAUSE THESE TWO ARE CLOSELY
CORRELATED.
AND BECAUSE THE VIF FOR INFIL
HAS LARGEST, SO WE FIRST
CONSIDER DROP INFIL.
THEN CHEKALIN YAIRITY.
-- CHECK LINEARITY.
LIKE CELL, LOG CELL AND THE LI.
AND LI AND THE LOG LI.
AND LOOK AT THIS, THE P VALUES
THEY ARE ALL GOING.
WE DON'T NEED TO WORRY ABOUT
LINEARITY.
THEN WE CHECK STEPWISE
REGRESSION.
WE USE SIGNIFICANCE LEVEL OF
0.3.
SET TO ALLOW A VARIABLE INTO
THE MODEL AND TO STAY IN THE
MODEL.
0.3.
THIS TABLE SHOWS A SUMMARY OF
STEPWISE SELECTION.
YOU WILL SEE ALL THREE P
VARIABLES ARE LESS THAN 0.3.
AND HERE ALSO SHOWS AREA AUROC.
YOU SEE EACH VARIABLE ADDED HOW
MUCH AUROC ADDED.
BASED ON THE THREE SELECTED
VARIABLES, LOGISTIC REGRESSION
USING THE SELECTED PREDICTORS,
THEN WE CHECK THE GOODNESS OF
FIT.
AND THE HL TEST WITH THE P
VALUE OF 0.5054.
WE CAN SEE THEY FIT WELL.
AND THIS TABLE, THE LEFT SIDE
SHOWS ODDS RATIO, BASED ON THE
UNIT CALLED 1.
WHICH IS DEFAULT.
YOU SEE THEY JUST DON'T KNOW
WHAT ARE THEY.
AND THEN WE CAN ADJUST THE
UNIT, LIKE FOR LI, CHANGE UNIT
TO 0.1.
YOU SEE THEY LOOK VERY NICE.
AND TEMP, WE CHANGE THE UNIT TO
0.01.
AND WITH CELL WE CHANGE IT TO
0.01.
THEN THEY HAVE VERY NICE ODDS
RATIO.
LIKE FOR LI WE CAN INTERPRET IT
AS FOR EACH 0.1 UNIT INCREASE,
THE ODDS OF REMISSION INCREASED
47.
AND WE USE SIGNIFICANCE LEVEL
OF 0.15.
WHICH IS USED.
THEN THE MODEL INCLUDE ONLY ONE
BIOMARKER, WHICH IS LI.
LIKE THIS.
AND THE OTHER HL TEST P VALUE
IS OKAY.
THIS SLIDE SHOWS DIAGNOSTIC
TEST FOR THE FOUR STATISTICS.
YOU SEE IN THE PEARSON RESIDUAL
THERE'S ONE OUTLIER.
AND THIS ONE IS ALSO SHOWING IN
THE DEVIANCE RESIDUAL.
FOR THE LEVERAGE THERE'S NO
OUTLIER.
AND FOR THE CONFIDENCE
INTERVAL, THIS IS PLACEMENT OF
C OR C STATISTICS ALSO SHOW.
THE OUTLIER FROM EACH OF THE
PLOTS ARE THE SAME, IS THE CASE
8.
CASE 8.
THIS TABLE IS PREDICTOR
PROBABILITIES FOR CASE 1 TO 8
FOR THIS MODEL.
THE FIRST COLUMN IS THE CASE
NUMBER.
AND THE SECOND COLUMN IS
RESERVED VALUE FOR REMISSION.
1 IS REMISSION OCCUR.
AND 0 IS NO REMISSION.
AND LI VALUE.
AND FROM IS SAME AS REMISSION.
AND THE INTO COLUMN IS A
PREDICTOR REMISSION STATUS.
DETERMINED BY THE PHAT.
PHAT IS A PREDICTOR PROBABILITY
FOR REMISSION EQUAL TO 1.
SO HERE, IT WAS A PHAT HAS A
VALUE GREATER THAN 0.5.
SO INTO COLUMN IS 1.
LESS THAN 1, 0.5 WOULD BE 0
LIKE THIS ONE.
LESS THAN 0.5 IS 0.
SO THIS IS A PREDICTOR
REMISSION STATUS BASED ON THE
PREDICTOR PROBABILITY.
THESE TWO COLUMNS ARE THE
CONFIDENCE INTERVALS FOR THE
PHAT.
AND XP1 IS THE CROSS VALIDATED
PROBABILITY.
FOR REMISSION 1.
WHICH IS CALCULATED LEAVE ON
THE LEAVE-ONE-OUT PRINCIPLE.
AND XP0 IS EQUAL TO 1 MINUS XP1.
FOR EXAMPLE, FOR THE CASE #1,
THE OBSERVED REMISSION STATUS
IS 1.
AND THE PREDICTOR IS ALSO 1.
THE PREDICTOR PROBABILITY IS
0.849.
AND THE CONFIDENCE INTERVAL ARE
THIS.
AND IF WE EXCLUDE THE CASE #1
DATA, AND THEN THE PREDICTOR
PROBABILITY FOR CASE #1 IS 0.8.
SO IT'S VERY CLOSE.
WHICH MEANS THE CASE #1 DATA IS
NOT INFLUENTIAL OBSERVATION.
AND FOR THE CASE #8, THE
OBSERVED REMISSION IS 0.
SO IT'S NO REMISSION.
AND THE PREDICTOR REMISSION
STATUS IS 1.
AND BECAUSE CASE #8 AND #1 HAVE
THE SAME LI VALUE, SO THE PHAT,
THE PREDICTOR P VALUE ARE THE
SAME.
BUT THIS ONE IS DIFFERENT.
IT WAS A CASE #1 OR CASE #8 IS
EXCLUDED, AND THEN DO THE
PREDICTION OF THE P VALUE IS
0.9.
SO THERE'S A BIG DIFFERENCE
BETWEEN HERE.
HERE ALSO SHOWING IN THE
PEARSON AND DEVIANCE RESIDUAL.
BECAUSE THE DIFFERENT PREDICTOR
PROBABILITY AND OBSERVED
PROBABILITY ARE VERY DIFFERENT.
SO BASED ON THE PREDICTOR
MODEL, WE CAN PREDICT THE
PROBABILITY FOR REMISSION 1
FORGIVEN LI VALUE.
FOR EXAMPLE, LI EQUAL TO 1.5.
AND THEN YOU REPLACE 1.5 TO
THIS MODEL.
YOU GET YOUR EXPONENTIAL, YOU
GET THIS, AND THEN YOU CAN GET
THE PREDICTOR P VALUE AS 0.635.
THIS MEANS FOR LI EQUAL TO 1.5,
THE PREDICTOR PROBABILITY OF
REMISSION EQUAL TO 1 IS 0.635.
THIS ALSO SHOW -- I ALSO
CALCULATED THE PREDICTOR MODEL
BY EXCLUDING CASE #8.
YOU SEE THE DIFFERENCE.
SO THE SLOPE HERE IS 2.89.
AND HERE IS 4.5.
AND THE ODDS RATIO BASED ON THE
UNIT OF 0.1.
SO HERE IS 1.34.
AND HERE IS 1.57.
AND THE HL TESTER IS HERE, BOTH
ARE OKAY.
LIKE IN THIS CASE, THIS IS, WE
CALL THE SENSITIVITY ANALYSIS.
WE SHOULD REPORT BOTH RESULTS.
THE SUMMARY.
AND LOGISTIC REGRESSION
ANALYSIS IS USED TO EVALUATE
THE ASSOCIATION OF ONE OR MORE
INDEPENDENT VARIABLES WITH A
BINARY DEPENDENT VARIABLE.
AND TO ESTIMATE THE PROBABILITY
OF PARTICULAR OUTCOME GIVEN THE
VALUES OF INDEPENDENT VARIABLES.
FOR LOGISTIC REGRESSION WE
REPORT ODDS RATIO.
AND THE 95% CONFIDENCE INTERVAL.
AND ALSO WE CAN REPORT THE
PREDICTOR MODELS.
AND LOGISTIC REGRESSION
COMPARED TO THE LINEAR
REGRESSION IS THE MAIN
DIFFERENCE.
LOGISTIC REGRESSION WE USE THE
DEPENDENT VARIABLE IS BINARY
VARIABLE.
THEY ALSO NEED TO MEET THE FOUR
BASIC ASSUMPTIONS.
INDEPENDENT OBSERVATIONS, NO
MULTICOLLINEARITY, LINEARITY
BETWEEN THE CONTINUOUS VARIABLE
AND NO INFLUENTIAL OBSERVATION
AND CHECK THE HL
GOODNESS-OF-FIT TEST.
ANY QUESTIONS? 1161 00:58:31,741 THANK YOU VERY MUCH.