BookmarkSubscribeRSS Feed
Calcite | Level 5

## SEEKING ASSISTANCE ABOUT COX MULTIVARIATE FRACTIONAL POLYNOMIAL ANALYSIS MACRO

Hello Sir/Madam

I have a problem that is longstanding. I often encounter continuous variables that are non linear yet I want to model the variables as linear variables. There is a macro I found in one published article(  FRACTIONAL POLYNOMIAL MODEL USING AUTOMATED MPF8 MACRO). The problem is that always the macro refuses to run and I don't want to stratify the variables.

%mfp8 (
dsname = Develop,
yname = Outcome,
xname = BMI SBP CHOLE,
xbin = Sex AGE INCOME,
xinclude = ,
model = S ,
pw = -2 -1 -0.5 0 0.5 1 2 3,
m = 2,
censvar = Censor,
censval = 0,
strata = Sex AGE_GROUP1 CTRB_PT_TYPE_CD DRNK_HABIT_RSPS_CD SMK_STAT_TYPE_RSPS_CD EXERCI_FREQ_RSPS_CD,
ties = efron,
alpha = 0.05,
mselect = ra2,
maxcycle = 10,
macpath = C:\Users\David\Desktop analysis,
dsout = fpout,
showres = r
);

I tried to rewrite the macro in this way

%Macro mfp8 (
dsname = Develop,
yname = Outcome,
xname = BMI SBP CHOLE,
xbin = Sex AGE INCOME,
xinclude = ,
model = S ,
pw = -2 -1 -0.5 0 0.5 1 2 3,
m = 2,
censvar = Censor,
censval = 0,
strata = Sex AGE_GROUP1 CTRB_PT_TYPE_CD DRNK_HABIT_RSPS_CD SMK_STAT_TYPE_RSPS_CD EXERCI_FREQ_RSPS_CD,
ties = efron,
alpha = 0.05,
mselect = ra2,
maxcycle = 10,
macpath = C:\Users\David\Desktop analysis,
dsout = fpout,
showres = r
);

%Mend mfp8;

But it also did not excecute.

I will be glad for assistance.

7 REPLIES 7
Calcite | Level 5

## SAS COX HAZARDS MODELLING USING FRACTIONAL POLYNOMIALS

Hello Sir/Madam

I have a problem that is longstanding. I often encounter continuous variables that are non linear yet I want to model the variables as linear variables. There is a macro I found in one published article(  FRACTIONAL POLYNOMIAL MODEL USING AUTOMATED MPF8 MACRO). The problem is that always the macro refuses to run and I don't want to stratify the variables.

%mfp8 (
dsname = Develop,
yname = Outcome,
xname = BMI SBP CHOLE,
xbin = Sex AGE INCOME,
xinclude = ,
model = S ,
pw = -2 -1 -0.5 0 0.5 1 2 3,
m = 2,
censvar = Censor,
censval = 0,
strata = Sex AGE_GROUP1 CTRB_PT_TYPE_CD DRNK_HABIT_RSPS_CD SMK_STAT_TYPE_RSPS_CD EXERCI_FREQ_RSPS_CD,
ties = efron,
alpha = 0.05,
mselect = ra2,
maxcycle = 10,
macpath = C:\Users\David\Desktop analysis,
dsout = fpout,
showres = r
);

I tried to rewrite the macro in this way

%Macro mfp8 (
dsname = Develop,
yname = Outcome,
xname = BMI SBP CHOLE,
xbin = Sex AGE INCOME,
xinclude = ,
model = S ,
pw = -2 -1 -0.5 0 0.5 1 2 3,
m = 2,
censvar = Censor,
censval = 0,
strata = Sex AGE_GROUP1 CTRB_PT_TYPE_CD DRNK_HABIT_RSPS_CD SMK_STAT_TYPE_RSPS_CD EXERCI_FREQ_RSPS_CD,
ties = efron,
alpha = 0.05,
mselect = ra2,
maxcycle = 10,
macpath = C:\Users\David\Desktop analysis,
dsout = fpout,
showres = r
);

%Mend mfp8;

But it also did not excecute.

I will be glad for assistance.

Jade | Level 19

## Re: SAS COX HAZARDS MODELLING USING FRACTIONAL POLYNOMIALS

1. Stop using all upcase titles, screaming is not necesary.
2. SAS macros are nothing more than automatic code replacements. Before you write a macro you need working code.
3. Posting the log as text using {i} icon is necessary to see what happened.
Calcite | Level 5

## Re: SAS COX HAZARDS MODELLING USING FRACTIONAL POLYNOMIALS

The macro does not return any error message.

Calcite | Level 5

## Re: SAS COX HAZARDS MODELLING USING FRACTIONAL POLYNOMIALS

Is there any other procedure availbale in sas 9.4 to carry out multivariable fractional polynomial modelling in cox models

Calcite | Level 5

## Re: SAS COX HAZARDS MODELLING USING FRACTIONAL POLYNOMIALS

It seems that the macro MFP8 needs some modifications to run on SAS 9.4, but the paper by Lund in the Proccedings 2015 is no more available on the SAS support page.

http://support.sas.com/resources/papers/proceedings15/2687-2015.pdf

I cannot say more.

Rhodochrosite | Level 12

## Re: SEEKING ASSISTANCE ABOUT COX MULTIVARIATE FRACTIONAL POLYNOMIAL ANALYSIS MACRO

To debug macro problems, I find the MPRINT and MLOGIC options to be very helpful.  You should be able to see where the macro is going astray.

Calcite | Level 5

## Re: SEEKING ASSISTANCE ABOUT COX MULTIVARIATE FRACTIONAL POLYNOMIAL ANALYSIS MACRO

I finally found the paper where the modifications of the MPF8 macro are given.

Go to :

https://www.mwsug.org/2014-proceedings.html

and click on paper AA-09 to download it. Then have a look on appendix B.

in addition, you need several macro to run MPF8 that you can find at :

http://people.musc.edu/~hille/2009BMTRY755_Website/LectureNotes/Diagnostics2/MFP2neu/

Discussion stats
• 7 replies
• 2564 views
• 0 likes
• 4 in conversation