Date: Fri, 2 Jul 2004 08:49:47 +0200
Reply-To: Marta García-Granero
<biostatistics@terra.es>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Marta García-Granero
<biostatistics@terra.es>
Organization: Asesoría Bioestadística
Subject: Re: LOGISTIC REGRESSION: VARIABLES=...BY [var]
In-Reply-To: <5.1.0.14.2.20040701145307.00a4bde0@pop.mindspring.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi Richard,
RR> From the syntax manual entry for LOGISTIC REGRESSION, syntax template:
RR> LOGISTIC REGRESSION [VARIABLES =] dependent var
RR> [WITH independent varlist [BY var [BY var] ... ]]
RR> "· You can indicate an interaction term on the variable list by using the
RR> keyword BY to separate the individual variables."
RR> I don't quite understand this. If you use "BY var", does that mean
RR> interaction terms between "var" and all preceding variables, or what? Or
RR> can specific interaction variables be included, or excluded, on VARIABLES
RR> or METHOD subcommands?
THe syntax defines specific interaction terms. For example:
LOGISTIC REGRESSION VAR=kyphosis WITH age starvert age BY starvert
/CRITERIA = PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
This syntax models the dependent variable Kyphosis as a function of:
- Age
- Starvert
- The interaction between the two above
LOGISTIC REGRESSION VAR=kyphosis WITH age numvert starvert age BY starvert
/CRITERIA = PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
This syntax models the dependent variable Kyphosis as a function of:
- Age
- Numvert
- Starvert
- The interaction between age & starvert (numvert is not involved)
I always use "*" to indicate interaction terms, it looks clearer to me:
LOGISTIC REGRESSION VAR=kyphosis WITH age numvert starvert age*starvert
/CRITERIA = PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .
--
HTH,
Marta mailto:biostatistics@terra.es