General Loglinear Analysis

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

General Loglinear Analysis

Brock-15
Hello Everyone,

I recently bought both of Marija Norusis's texts (Statistical Procedures
and Advanced Statistical Procedures) as a refresher.  While I have had
exposure to the majority of the concepts, running the procedures in SPSS
is new to me.

While I know this is not an SPSS question per se, I was reading the
chapter on General Loglinear Analysis and can not get my head around this
analysis.  When would I ever use this?  Could someone give me an example
of when I would want to try to model the counts of my crosstabs?  For
instance, I think of it in terms of survey research.  If I fit this
"model" to one set of crosstabs, the next time I run a survey (say a year
later), my counts and everything would be different.  I guess naively I
think of analysis in one of two vains; hypothesis testing and prediction.
While I think Norusis did an excellent job describing how to go out the
procedure, I simply do not understand when I would use this technique in a
decision making environment.

Many thanks for any light you can shine on my question.

~ Brock
Reply | Threaded
Open this post in threaded view
|

Re: General Loglinear Analysis

Hector Maletta
        While Loglinear Analysis deals with frequency counts, it is not so
much dependent on the actual absolute frequencies but on the PROPORTIONS
between the frequencies of the various combinations or response patterns. In
this sense, responses to one survey can be different from responses to some
other survey asking the same questions at some other date, but this is true
for whatever other procedure you apply, not just for Loglinear Analysis.

        On the other hand, Loglinear Analysis is mathematically related to
other analyses that explain response patterns to a number of observable
categorical questions as a function of a set of unobservable variables
(those nasty Greek letters representing unobservable parameters the whole
thing is about).

        Hector

        -----Mensaje original-----
De: SPSSX(r) Discussion [mailto:[hidden email]] En nombre de
[hidden email]
Enviado el: 20 November 2006 20:14
Para: [hidden email]
Asunto: General Loglinear Analysis

        Hello Everyone,

        I recently bought both of Marija Norusis's texts (Statistical
Procedures
        and Advanced Statistical Procedures) as a refresher.  While I have
had
        exposure to the majority of the concepts, running the procedures in
SPSS
        is new to me.

        While I know this is not an SPSS question per se, I was reading the
        chapter on General Loglinear Analysis and can not get my head around
this
        analysis.  When would I ever use this?  Could someone give me an
example
        of when I would want to try to model the counts of my crosstabs?
For
        instance, I think of it in terms of survey research.  If I fit this
        "model" to one set of crosstabs, the next time I run a survey (say a
year
        later), my counts and everything would be different.  I guess
naively I
        think of analysis in one of two vains; hypothesis testing and
prediction.
        While I think Norusis did an excellent job describing how to go out
the
        procedure, I simply do not understand when I would use this
technique in a
        decision making environment.

        Many thanks for any light you can shine on my question.

        ~ Brock
Reply | Threaded
Open this post in threaded view
|

Re: programming issue

Sibusiso Moyo
In reply to this post by Brock-15
Dear All,

How could I create a variable that computes the following:

 

1.      when a product is mentioned in the survey as a YES = 1;
2.      now I want a variable that has both Prod A and Prod B be saying YES for the same id. That is for the same ID i want a new variable that captured products A and B as being mentioned as YES.






id       month  prod     mentioned       Prod A  Prod B  Both
1        jan     A       Yes     1                
1        feb     B       Yes             1        
3        mar     C       No                      
4        apr     D       No                      
5        may     A       Yes     1                
5        jun     B       Yes             1        
7        jul     C       No                      
8        aug     D       No                      
9        sep     A       yes     1                
9        oct     B       yes             1        


Thank you.
Reply | Threaded
Open this post in threaded view
|

Re: programming issue

Melissa Ives
This will create a dichotomous variable ('both') if prod is either A or
B.
Compute both=(prod="A" or prod="B").


Melissa

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Sibusiso Moyo
Sent: Monday, November 20, 2006 2:52 PM
To: [hidden email]
Subject: Re: [SPSSX-L] programming issue

Dear All,

How could I create a variable that computes the following:



1.      when a product is mentioned in the survey as a YES = 1;
2.      now I want a variable that has both Prod A and Prod B be saying
YES for the same id. That is for the same ID i want a new variable that
captured products A and B as being mentioned as YES.






id       month  prod     mentioned       Prod A  Prod B  Both
1        jan     A       Yes     1
1        feb     B       Yes             1
3        mar     C       No
4        apr     D       No
5        may     A       Yes     1
5        jun     B       Yes             1
7        jul     C       No
8        aug     D       No
9        sep     A       yes     1
9        oct     B       yes             1


Thank you.



PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.
Reply | Threaded
Open this post in threaded view
|

Re: programming issue

Jerabek Jindrich
In reply to this post by Sibusiso Moyo
Hello,

you could flag every case whether A,B mentioned and then use aggregate:

*Assumed: ID, ment are numeric, prod string variable.
* Flags cases for A,B products mentioned.
COMPUTE prodA = 0.
COMPUTE prodB = 0.
IF prod='A' and ment=1 prodA = 1.
IF prod='B' and ment=1 prodB = 1.

*Agregate and for every ID compute how many times A,B mentioned.
AGGREGATE
  /OUTFILE= *
  /BREAK=id
  /prodA = SUM(prodA) /prodB = SUM(prodB).

*1 is for A,B mentioned at least once.
IF prodA gt 0 prodA=1.
IF prodA gt 0 prodA=1.
*Alternatively you can skip it and keep number of cases where prod mentioned.

*Both mentioned.
IF prodA and prodB both=1.
EXEC.

VAL LAB prodA 1 'product A mentioned'.
VAL LAB prodB 1 'product B mentioned'.
VAL LAB both 1 'A and B mentioned'.

Now you should have new dataset with 1 case for every ID with product A,B and both flaged.

HTH
Jindra

> ------------ Původní zpráva ------------
> Od: Sibusiso Moyo <[hidden email]>
> Předmět: Re: programming issue
> Datum: 20.11.2006 21:58:54
> ----------------------------------------
> Dear All,
>
> How could I create a variable that computes the following:
>
>
>
> 1.      when a product is mentioned in the survey as a YES = 1;
> 2.      now I want a variable that has both Prod A and Prod B be saying YES for
> the same id. That is for the same ID i want a new variable that captured
> products A and B as being mentioned as YES.
>
>
>
>
>
>
> id       month  prod     mentioned       Prod A  Prod B  Both
> 1        jan     A       Yes     1
> 1        feb     B       Yes             1
> 3        mar     C       No
> 4        apr     D       No
> 5        may     A       Yes     1
> 5        jun     B       Yes             1
> 7        jul     C       No
> 8        aug     D       No
> 9        sep     A       yes     1
> 9        oct     B       yes             1
>
>
> Thank you.
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: General Loglinear Analysis

Anthony Babinec
In reply to this post by Brock-15
There can be various dependencies in multiway
tables that are not fully understood or accounted
for by examining only bivariate tables of association.
This is where loglinear models are useful. See
Alan Agresti's "Categorical Data Analysis, 2nd edition,"
for some examples.

The logit model in which one variable is a target
and the others are predictors is subsumed
in the general loglinear model. With the rising use
of logistic regression, there is probably more interest
in models with a single target variable than in
the general loglinear model.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
[hidden email]
Sent: Monday, November 20, 2006 1:14 PM
To: [hidden email]
Subject: General Loglinear Analysis

Hello Everyone,

I recently bought both of Marija Norusis's texts (Statistical Procedures
and Advanced Statistical Procedures) as a refresher.  While I have had
exposure to the majority of the concepts, running the procedures in SPSS
is new to me.

While I know this is not an SPSS question per se, I was reading the
chapter on General Loglinear Analysis and can not get my head around this
analysis.  When would I ever use this?  Could someone give me an example
of when I would want to try to model the counts of my crosstabs?  For
instance, I think of it in terms of survey research.  If I fit this
"model" to one set of crosstabs, the next time I run a survey (say a year
later), my counts and everything would be different.  I guess naively I
think of analysis in one of two vains; hypothesis testing and prediction.
While I think Norusis did an excellent job describing how to go out the
procedure, I simply do not understand when I would use this technique in a
decision making environment.

Many thanks for any light you can shine on my question.

~ Brock
Reply | Threaded
Open this post in threaded view
|

Re: programming issue

Beadle, ViAnn
In reply to this post by Melissa Ives
This makes a fundamental assumption that a case corresponds to an ID. Can we assume that?

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Melissa Ives
Sent: Monday, November 20, 2006 3:05 PM
To: [hidden email]
Subject: Re: programming issue

This will create a dichotomous variable ('both') if prod is either A or
B.
Compute both=(prod="A" or prod="B").


Melissa

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Sibusiso Moyo
Sent: Monday, November 20, 2006 2:52 PM
To: [hidden email]
Subject: Re: [SPSSX-L] programming issue

Dear All,

How could I create a variable that computes the following:



1.      when a product is mentioned in the survey as a YES = 1;
2.      now I want a variable that has both Prod A and Prod B be saying
YES for the same id. That is for the same ID i want a new variable that
captured products A and B as being mentioned as YES.






id       month  prod     mentioned       Prod A  Prod B  Both
1        jan     A       Yes     1
1        feb     B       Yes             1
3        mar     C       No
4        apr     D       No
5        may     A       Yes     1
5        jun     B       Yes             1
7        jul     C       No
8        aug     D       No
9        sep     A       yes     1
9        oct     B       yes             1


Thank you.



PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.
Reply | Threaded
Open this post in threaded view
|

Re: programming issue

Sibusiso Moyo
In reply to this post by Sibusiso Moyo
No the case does not correspond to ID as one ID can be repeated for more than one case. I have solved the problem though, thanks to the list as follows:

Get file = 'C:\TEMP\filename.sav'.

/* STEP 1: Agregate and for every ID compute how many times A,B mentioned. */

AGGREGATE
  /OUTFILE= *
  /BREAK=trxid cell month market prod
        /prodA = SUM(prodA)
        /prodB = SUM(prodB).

/* STEP 2: 1 is for mentioned at least once. */

IF prodA  gt 0 prodA =1.
IF prodB gt 0 prodB=1.
exe.

/* Both mentioned */

IF prodA and prodB both=1.
EXEC.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]]On Behalf Of
Beadle, ViAnn
Sent: Monday, November 20, 2006 9:00 PM
To: [hidden email]
Subject: Re: programming issue


This makes a fundamental assumption that a case corresponds to an ID. Can we assume that?

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Melissa Ives
Sent: Monday, November 20, 2006 3:05 PM
To: [hidden email]
Subject: Re: programming issue

This will create a dichotomous variable ('both') if prod is either A or
B.
Compute both=(prod="A" or prod="B").


Melissa

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Sibusiso Moyo
Sent: Monday, November 20, 2006 2:52 PM
To: [hidden email]
Subject: Re: [SPSSX-L] programming issue

Dear All,

How could I create a variable that computes the following:



1.      when a product is mentioned in the survey as a YES = 1;
2.      now I want a variable that has both Prod A and Prod B be saying
YES for the same id. That is for the same ID i want a new variable that
captured products A and B as being mentioned as YES.






id       month  prod     mentioned       Prod A  Prod B  Both
1        jan     A       Yes     1
1        feb     B       Yes             1
3        mar     C       No
4        apr     D       No
5        may     A       Yes     1
5        jun     B       Yes             1
7        jul     C       No
8        aug     D       No
9        sep     A       yes     1
9        oct     B       yes             1


Thank you.



PRIVILEGED AND CONFIDENTIAL INFORMATION
This transmittal and any attachments may contain PRIVILEGED AND
CONFIDENTIAL information and is intended only for the use of the
addressee. If you are not the designated recipient, or an employee
or agent authorized to deliver such transmittals to the designated
recipient, you are hereby notified that any dissemination,
copying or publication of this transmittal is strictly prohibited. If
you have received this transmittal in error, please notify us
immediately by replying to the sender and delete this copy from your
system. You may also call us at (309) 827-6026 for assistance.