goodness of fot test for dependent observations

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

goodness of fot test for dependent observations

Dominic Lusinchi

Is anybody aware of a goodness of fit test, equivalent to the one-sample chi-square one, for dependent observations? For example, if on a survey one asks of youngsters what sport(s) they partake in, they are likely to mention more than one sport: this is a multiple response type of question (check all that apply). You can’t use the classic chi-square because the categories (of the variable sports activities) are not mutually exclusive. So what’s the alternative? If it exists, is it available in SPSS?

 

Thanks in advance. Enjoy the weekend.

Dominic

 

Dominic Lusinchi

* Email: [hidden email]

ü Web: www.farwestresearch.com

**********************************************

 

Reply | Threaded
Open this post in threaded view
|

Re: goodness of fot test for dependent observations

Ryan
From what you've described, one option would be to run a type of generalized estimating equation (GEE).

If you plan on running a GEE, you will need to set up your data set in vertical format:

Person_ID     Sport     Endorsed
1                   1            0
1                   2            1
1                   3            1
2                   1            0
2                   2            0
2                   3            1
.
.
.
N

where

Person_ID is the ID assigned to each person in the dataset

Sport is a categorical, within-subjects variable with k levels (in this example there are three levels or sports)

Endorsed is the binary dependent variable where 1=Yes and 0=No

The following code should work:

* Generalized Estimating Equations.
GENLIN Endorsed (REFERENCE=LAST) BY Sport (ORDER=ASCENDING)
  /MODEL Sport INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /CRITERIA METHOD=FISHER(1) SCALE=1 MAXITERATIONS=100 MAXSTEPHALVING=5 PCONVERGE=1E-006(ABSOLUTE)
    SINGULAR=1E-012 ANALYSISTYPE=3(WALD) CILEVEL=95 LIKELIHOOD=FULL
  /REPEATED SUBJECT=Person_ID WITHINSUBJECT=Sport SORT=YES CORRTYPE=UNSTRUCTURED ADJUSTCORR=YES
    COVB=ROBUST MAXITERATIONS=100 PCONVERGE=1e-006(ABSOLUTE) UPDATECORR=1
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

There were several assumptions I made when working on this code, but I figure this is enough for now. Of note, I added (EXPONENTIATED) in order for you to see the estimated odds ratios.

Best,

Ryan

Dominic Lusinchi wrote
Is anybody aware of a goodness of fit test, equivalent to the one-sample
chi-square one, for dependent observations? For example, if on a survey one
asks of youngsters what sport(s) they partake in, they are likely to mention
more than one sport: this is a multiple response type of question (check all
that apply). You can't use the classic chi-square because the categories (of
the variable sports activities) are not mutually exclusive. So what's the
alternative? If it exists, is it available in SPSS?



Thanks in advance. Enjoy the weekend.

Dominic



Dominic Lusinchi

* Email: dominic@farwestresearch.com

* Web: www.farwestresearch.com

**********************************************


Reply | Threaded
Open this post in threaded view
|

Re: goodness of fot test for dependent observations

Dominic Lusinchi
In reply to this post by Dominic Lusinchi
Thank you, Ryan, for this.

Actually, after some memory jogging, having not dealt with this kind of data
situation in a while, I decided that Cochran's Q test is probably the most
appropriate for this issue.

Best regards,
Dominic

Dominic Lusinchi
San Francisco, California
www.farwestresearch.com

-----Original Message-----
From: rblack [mailto:[hidden email]]
Sent: Saturday, December 05, 2009 6:25 PM
Subject: Re: goodness of fot test for dependent observations

From what you've described, one option would be to run a type of generalized
estimating equation (GEE).

If you plan on running a GEE, you will need to set up your data set in
vertical format:

Person_ID     Sport     Endorsed
1                   1            0
1                   2            1
1                   3            1
2                   1            0
2                   2            0
2                   3            1
.
.
.
N

where

Person_ID is the ID assigned to each person in the dataset

Sport is a categorical, within-subjects variable with k levels (in this
example there are three levels or sports)

Endorsed is the binary dependent variable where 1=Yes and 0=No

The following code should work:

* Generalized Estimating Equations.
GENLIN Endorsed (REFERENCE=LAST) BY Sport (ORDER=ASCENDING)
  /MODEL Sport INTERCEPT=YES
 DISTRIBUTION=BINOMIAL LINK=LOGIT
  /CRITERIA METHOD=FISHER(1) SCALE=1 MAXITERATIONS=100 MAXSTEPHALVING=5
PCONVERGE=1E-006(ABSOLUTE)
    SINGULAR=1E-012 ANALYSISTYPE=3(WALD) CILEVEL=95 LIKELIHOOD=FULL
  /REPEATED SUBJECT=Person_ID WITHINSUBJECT=Sport SORT=YES
CORRTYPE=UNSTRUCTURED ADJUSTCORR=YES
    COVB=ROBUST MAXITERATIONS=100 PCONVERGE=1e-006(ABSOLUTE) UPDATECORR=1
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION (EXPONENTIATED).

There were several assumptions I made when working on this code, but I
figure this is enough for now. Of note, I added (EXPONENTIATED) in order for
you to see the estimated odds ratios.

Best,

Ryan


Dominic Lusinchi wrote:

>
> Is anybody aware of a goodness of fit test, equivalent to the one-sample
> chi-square one, for dependent observations? For example, if on a survey
> one
> asks of youngsters what sport(s) they partake in, they are likely to
> mention
> more than one sport: this is a multiple response type of question (check
> all
> that apply). You can't use the classic chi-square because the categories
> (of
> the variable sports activities) are not mutually exclusive. So what's the
> alternative? If it exists, is it available in SPSS?
>
>
>
> Thanks in advance. Enjoy the weekend.
>
> Dominic
>
>
>
> Dominic Lusinchi
>
> * Email: [hidden email]
>
> * Web: www.farwestresearch.com
>
> **********************************************
>
>
>
>
>

--
View this message in context:
http://old.nabble.com/goodness-of-fot-test-for-dependent-observations-tp2666
0096p26661631.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (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