BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
cici5723
Calcite | Level 5

ERROR: A feasible optimal fixed ratio matching that has the specified parameters does not exist.

 

I meet this problem when I do the 1-5 optimal matching, here is the code: 

 

/* Perform the 1-to-5 optimal matching */
proc psmatch data=DRUGS region=allobs;
    class Treatment Gender;
    psmodel Treatment(Treated='1') = Gender Age BMI;
    match method=optimal(k=5) exact=Gender distance=ps caliper=0.5; 
    output out(obs=match)=matched2 matchid=_MatchID;
run;

If I change the k=1, it could run, while it showed error when I put k=5.截屏2024-03-09 15.48.54.png截屏2024-03-09 13.34.00.png

1 ACCEPTED SOLUTION

Accepted Solutions
MichaelL_SAS
SAS Employee

Assuming the data that you are using are the same as the Drugs data set used in the PROC PSMATCH documentation, an optimal fixed ratio matching with 5 control units for every treated unit will not be feasible. There are only 373 control units and 113 treated units, so there aren't enough controls for that to satisfy that fixed ratio.

 

It might be that the prompt is requesting an optimal variable ratio matching, with 1-5 control units matched to each treated unit. You would request such a matching my using the METHOD=VARRATIO(KMAX=5) specification in the MATCH statement. Using the DRUGS data set from the PROC PSMATCH documentation, that matching is feasible.

View solution in original post

2 REPLIES 2
sbxkoenk
SAS Super FREQ

I have moved this topic from "SAS Studio" - board to "Statistical Procedures" - board.

 

@paulT can help you with this.

(... yet if paulT is the Paul I think he is.)

 

Koen

MichaelL_SAS
SAS Employee

Assuming the data that you are using are the same as the Drugs data set used in the PROC PSMATCH documentation, an optimal fixed ratio matching with 5 control units for every treated unit will not be feasible. There are only 373 control units and 113 treated units, so there aren't enough controls for that to satisfy that fixed ratio.

 

It might be that the prompt is requesting an optimal variable ratio matching, with 1-5 control units matched to each treated unit. You would request such a matching my using the METHOD=VARRATIO(KMAX=5) specification in the MATCH statement. Using the DRUGS data set from the PROC PSMATCH documentation, that matching is feasible.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 671 views
  • 1 like
  • 3 in conversation