Date: Wed, 3 Sep 2008 17:08:42 -0400
Reply-To: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject: Re: Class variables proc logistic
In-Reply-To: <48BEF38D.40907@gmx.de>
Content-Type: text/plain; charset="us-ascii"
Monika:
Neither alternative makes much of a difference. Stepwise variable selection methods have obvious drawbacks that make them dangerous (in that the results can be misleading) if not simply a waste of time and resources. David Cassell and Peter Flom have presented all the usual caveats on SAS-L and elsewhere. I'll present some examples of how stepwise selection goes wrong at SESUG 2008.
PROC GLMSELECT (LASSO) gives you a better chance of specifying a useful model. For that you need V9.2 or a download from the SAS Web site.
S
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Monika Nauroth
Sent: Wednesday, September 03, 2008 4:29 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Class variables proc logistic
Does anyone know if the variable selection of a stepwise logistic regression depends on the choice of use of dummy coding or effect coding?
tal schrieb:
> On Sep 3, 3:05 am, peterflomconsult...@mindspring.com (Peter Flom)
> wrote:
>> tal <talila...@GMAIL.COM> wrote
>>
>>> I'm not sure- but i don't think the sampling is stratified. i have ,
>>> lets say:20 variables- "is XX important to you?" for each quest the
>>> response is
>>> 1- important 2- not important 3-no answer.
>>> (When i use the class statement- 3 dummy variables are created, but
>>> I'm only interested in the first two- the third one is created
>>> automatically- but i don't need it- and that's where I have a
>>> problem) As i said , for each observation i want to count the number
>>> of missing values in the questionnaire- and take it as explanatory
>>> variable- but since a dummy variable is created for each var1-var20
>>> the number of missing values is a linear combination of these. Does
>>> anybody know how to create only the 2 dummy variables that i need in
>>> proc logistic, and drop the third one?
>> If your IV has 3 levels, then LOGISTIC will create 2 dummy
>> variables;, by default SAS uses EFFECT coding, and dummy (or
>> reference) coding, is often better, but I don't think that explains
>> your problem
>>
>> So, could you show your code?
>>
>> e.g
>>
>> data today;
>> length IV $4;
>> input iv $ dv $ weight;
>> datalines;;
>> Imp yes 100
>> NotI yes 200
>> NA yes 50
>> Imp no 50
>> NotI no 100
>> NA no 50
>> ;;;;
>>
>> proc logistic data = today;
>> class iv (param = ref);
>> model dv = iv;
>> weight weight;
>> run;
>>
>> creates two dummy variables
>>
>> Peter
>>
>> Peter L. Flom, PhD
>> Statistical Consultant
>> www DOT peterflom DOT com
>
> Hi! I found another way to do it. Thanks a lot anyway!
>
|