- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I am running a quantile regression and do not want to use the standard options associated with the ORDER=statement in QUANTREG. I would instead like to establish my own reference/comparison group-is there a way currently to do this with the QUANTREG method?
Thank you
proc quantreg data=dataset ci=resampling (nrep=500); by Pathogen; class commodity;
model ill=commodity/quantile=0.25 0.5 0.75 plot=quantplot;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Unlike with some other PROCs (e.g., LOGISTIC), QUANTREG does not have an option to change the reference level in the CLASS statement. You will have to use the ORDER= option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ivm, I was afraid of that. Is there a way I could use a format feature possibly to use the default of ORDER=Formatted? Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
My approach would be to create a new variable in a data step, to be used as the CLASS variable. If you are using a character variable, the reference level should start with a "z" or "zz" so that it is the last one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much-I like that idea.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Create a new format value for the CLASS variable you want to specify a reference level for. For example, if "Barley" is the commodity you want as your reference level for all your commodities, use a PROC FORMAT VALUE statement to create a formatted value that sorts at the end of all formatted values by preceding that value with one or more right braces ("}"):
proc format;
value $comm "Barley"="}} Barley";
run;
proc quantreg . . . order=formatted;
class commodity;
. . . .
format commodity $comm.;
run;
This syntax will make "Barley" the reference level for the classification variable, commodity.