BookmarkSubscribeRSS Feed
DavidsM
Calcite | Level 5

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
DavidsM
Calcite | Level 5

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.

 

andreas_lds
Jade | Level 19
  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.
DavidsM
Calcite | Level 5

The macro does not return any error message. 

DavidsM
Calcite | Level 5

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

Letenneur
Calcite | Level 5

 

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.

Doc_Duke
Rhodochrosite | Level 12

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.

Letenneur
Calcite | Level 5

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/

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!

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
  • 7 replies
  • 2564 views
  • 0 likes
  • 4 in conversation