BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MeghnaRoy9
Obsidian | Level 7

Hi!

I have been asked to work on a dataset where P needs to be greater than ChiSq.

 

However, every time I run the code my P is <0.0001.

 

Is thee any method using which my P can be greater than ChiSq?

 

The code which I ran is:

 

PROC LOGISTIC DATA=CSD.DEV descending;
MODEL INS=
/*DDABAL_WOE*/
SavBal_WOE
ATMAmt_WOE
CDBal_WOE
/*MMBal_WOE*/
/*Dep_WOE*/
DepAmt_WOE
/*DDA_WOE*/
/*Sav_WOE*/
/*CD_WOE*/
/*MM_WOE*/
/LACKFIT RSQ;/*H.L. test*/
OUTPUT OUT = CSD.OUT P = PRED;
QUIT;
RUN;

 

P.S.: I'm new!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

Paige,

I think OP want to do Goodness Of Fit test (H-L Test) in option LACKFIT.

 

From OP's code , it apparently is doing Credit Score Card.

Improving GOF is a very broad and difficulty topic.

You can do this from two aspects( variables and outliers).

Check X variables is multicollinearity ? by using corrb option(drop correlation coefficient is bigger than 0.8) :

MODEL INS=
............
/LACKFIT  CORRB ;

 

Check if there are some outliers by option 

output out=output h=h c=c cbar=cbar predicted=PredProb;

 

And use FIRTH option of MODEL to improve GOF . 

 

View solution in original post

8 REPLIES 8
PaigeMiller
Diamond | Level 26

I'm afraid the question doesn't make sense to me.

 

P (probability) > Chi-squared might mean that you are performing one of many different statistical tests. (Which test?)

 

Prob > Chi-squared is a standard statistical output from PROC LOGISTIC and many other SAS procedures.

 

But really, you need more explanation to help us understand what you want. Or maybe you need to understand the question better before you explain it to us.

--
Paige Miller
Ksharp
Super User

Paige,

I think OP want to do Goodness Of Fit test (H-L Test) in option LACKFIT.

 

From OP's code , it apparently is doing Credit Score Card.

Improving GOF is a very broad and difficulty topic.

You can do this from two aspects( variables and outliers).

Check X variables is multicollinearity ? by using corrb option(drop correlation coefficient is bigger than 0.8) :

MODEL INS=
............
/LACKFIT  CORRB ;

 

Check if there are some outliers by option 

output out=output h=h c=c cbar=cbar predicted=PredProb;

 

And use FIRTH option of MODEL to improve GOF . 

 

PaigeMiller
Diamond | Level 26

@Ksharp wrote:

Paige,

I think OP want to do Goodness Of Fit test (H-L Test) in option LACKFIT.

 


I do not get that understanding from the original question. I wait for the original poster to clarify his/her question.

--
Paige Miller
Ksharp
Super User

In OP's post . Here is :

 

/LACKFIT RSQ;/*H.L. test*/

Reeza
Super User

@Ksharp wrote:

In OP's post . Here is :

 

/LACKFIT RSQ;/*H.L. test*/


Given the OP doesn't understand a P>CHISQ I wouldn't assume that s/he understands this code or wants that test and would also wait for clarification. 

PGStats
Opal | Level 21

"P > ChiSq" is the name of the statistic resulting from the analysis. You need a basic course in statistics to understand what this means.  When the statistic takes a value < 0.0001 for a model parameter estimate, that parameter is considered highly statistically significant, i.e. important to explain the dependent variable on the left of the = sign.

PG
KachiM
Rhodochrosite | Level 12

@MeghnaRoy9 

 

I am not sure of what you want. However, here is a silly example of a contingency table to test the proportion of M:F in 60:40 per cents.

Are you interested in such an example?

 

data have;
input gen $1. yes  no;
datalines;
M 3 2
F 2 3
;
run;

proc freq data=have;
 tables gen/
  nocum chisq testp=(60 40);
run;
The Chisquare = 0.0833
DF = 1
Prob = 0.7728
Ksharp
Super User

By the way, If you have a big table (like a million) , You will always get P is <0.0001.

That is the drawback of GOF .

 

Actually any GOF in statistical test is going to fail for big table .

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 8 replies
  • 888 views
  • 3 likes
  • 6 in conversation