| Date: | Fri, 28 Dec 2007 23:46:32 +0100 |
| Reply-To: | Henrik Lolle <lolle@socsci.aau.dk> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | Henrik Lolle <lolle@socsci.aau.dk> |
| Subject: | Re: putting dummy variables into regression |
|
| In-Reply-To: | <eaabb06a0712280951k34258210l6c0fb48234714dea@mail.gmail.com> |
| Content-Type: | text/plain; charset=ISO-8859-1; format="flowed" |
Hi Courtney,
You could also use the GLM/UNIANOVA procedure where you will find a BY
statement which corresponds to the CLASS statement in SAS. You can't
ask for standardized regression coefficients here, but you probably
don't need them anyway in a situation with categorical predictors.
Best,
Henrik
************************************************************
Henrik Lolle
Department of Economics, Politics and Public Administration
Aalborg University
Fibigerstraede 1
9200 Aalborg East
Phone: (+45) 9635 8184
************************************************************
Quoting Keith McCormick <keithmc123@gmail.com>:
> Hi,
>
> You could ... but it is going to amount to the same work. Doing so
> will still allow you to do the regression in the menus - as do I.
>
> In Transform ... Compute, you would put the new name, dummyvar1, in
> the box in the upper left and you would type the rest of the formula
> in the formula box on the right. In this case, it would be Major = 1.
> You will have to do this for each dummy variable.
>
> cheers, Keith
>
> On Dec 28, 2007 10:31 AM, Courtney Nichols
> <nicholscourtney@hotmail.com> wrote:
>>
>> Hi Keith,
>> Thanks so much for your help. Do you happen to know how to do the dummy
>> coding without using command syntax. I've never used the syntax and just
>> use the point and click interface with the dropdown menus and such. I can
>> learn how to use the program with syntax if needed, but thought I'd ask if
>> there is a way to do so with the menus.
>> Many thanks,
>>
>> Courtney
>>
>>
>>
>> "The grand essentials to happiness in this life are something to do,
>> something to love and something to hope for. " -- Joseph Addison
>>
>>
>> ________________________________
>> > Date: Fri, 28 Dec 2007 03:04:03 -0500
>> > From: keithmc123@gmail.com
>> > Subject: Re: putting dummy variables into regression
>> > To: SPSSX-L@LISTSERV.UGA.EDU
>>
>>
>> >
>> > Hello Courtney,
>> >
>> > My favorite way to dummy code is the following syntax:
>> >
>> > COMPUTE dummy_var1 = (category_var=1).
>> >
>> > In practice, it might look like this:
>> >
>> > COMPUTE Biology_YN = (Major = 1).
>> > COMPUTE Math_YN = (Major = 2).
>> > etc.
>> >
>> > If you need an F-test for the whole set of variables (like all the
>> > majors), you can put the entire set in a "block". And request Change
>> > in R Sq. The Delta R Sq can serve as an overall test for the dummy
>> > variables. To use a block, click on the next button when you are in
>> > regression. It sounds like you have more than one categorical var, so
>> > you can add a block for each one. The sequence of the blocks will make
>> > a difference in the interpretation, so you will want to think that
>> > through.
>> >
>> > Feel free to follow-up, but that should get you started.
>> >
>> > Hope that helps.
>> >
>> > Keith
>> > www.keithmccormick.com
>> >
>> > On Dec 27, 2007 2:42 PM, Courtney Nichols <nicholscourtney@hotmail.com>
>> wrote:
>> > > Hello All,
>> > > I apologize, I feel like this should be very simple to figure out, but
>> I'm new to SPSS and regression analysis in general. I need to run a
>> regression where some of my predictor variables are continuous and others
>> are categorical. I'm having trouble figuring out how to include the
>> categorical and need help with two things:
>> > > 1) How do I get SPSS to code the categorical variables (ie education
>> level) into a collection of dummy variables? (I hear there is a "class
>> statement" command in SAS that does this but don't see how to do it in SPSS
>> and am also not using command syntax)
>> > > 2) Once I have that, what regression in the analyze menu do I run to get
>> output that gives me both an overall F-test that tells me whether the
>> overall categorical variable (ie education level) should remain in the model
>> and beta coefficients or t-tests to interpret for each dummy (ie high
>> school, some college, graduate, etc. in relation to the omitted comparison
>> group)?
>> > > Many thanks in advance!
>> > > Courtney
>> > > "The grand essentials to happiness in this life are something to do,
>> something to love and something to hope for. " -- Joseph Addison
>> > >
>> > > _________________________________________________________________
>> > > Get the power of Windows + Web with the new Windows Live.
>> > > http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_122007
>> > > To manage your subscription to SPSSX-L, send a message to
>> > > LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
>> > > command. To leave the list, send the command
>> > > SIGNOFF SPSSX-L
>> > > For a list of commands to manage subscriptions, send the command
>> > > INFO REFCARD
>> > >
>> >
>> > =====================
>>
>> > To manage your subscription to SPSSX-L, send a message to
>> > LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
>> > command. To leave the list, send the command
>> > SIGNOFF SPSSX-L
>> > For a list of commands to manage subscriptions, send the command
>> > INFO REFCARD
>>
>> ________________________________
>> i'm is proud to present Cause Effect, a series about real people making a
>> difference. Learn more
>
> =====================
> To manage your subscription to SPSSX-L, send a message to
> LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
> command. To leave the list, send the command
> SIGNOFF SPSSX-L
> For a list of commands to manage subscriptions, send the command
> INFO REFCARD
>
=====================
To manage your subscription to SPSSX-L, send a message to
LISTSERV@LISTSERV.UGA.EDU (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
|