|
I have two independent logistic regression B values, and would like to
test whether they differ significantly (even at p < .10), as indeed they do visually with one sloping up and the other down. I wonder if there is a fairly straightforward way to do this in SPSS, starting from the data set that includes both. Each line is based on just two points [i.e., two ages], which are the same for both lines, but with different dependent variables (attitudes). Advice much appreciated. -Howard Schuman ===================== 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 |
|
Howard,
You should be able to test for a significant difference in slopes by fitting a multivariate model through the GENLIN procedure offered in SPSS. You'll need to structure your data set as follows: ID Y_Indic Age Y 1 1 24 0 1 2 24 1 2 1 33 1 2 2 33 0 3 1 28 0 3 2 28 1 4 1 16 1 4 2 16 1 . . Once you've structured your data set as described above, you can fit the model using the following code: GENLIN Y (REFERENCE=FIRST) BY Y_Indic (ORDER=ASCENDING) WITH Age /MODEL Y_Indic Age Y_Indic*Age INTERCEPT=YES DISTRIBUTION=BINOMIAL LINK=LOGIT /REPEATED SUBJECT=ID WITHINSUBJECT=Y_Indic SORT=YES CORRTYPE=EXCHANGEABLE ADJUSTCORR=YES /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION. The test associated with the Y_Indic*Age term will tell you if the slopes are significantly different. This code is specifically designed to handle the data set I described. Deviations from the presumed data set structure may require another approach. Ryan On Thu, Aug 5, 2010 at 3:19 PM, howard schuman <[hidden email]> wrote: > I have two independent logistic regression B values, and would like to > test whether they differ significantly (even at p < .10), as indeed they > do visually with one sloping up and the other down. I wonder if there is > a fairly straightforward way to do this in SPSS, starting from the data > set that includes both. Each line is based on just two points [i.e., two > ages], which are the same for both lines, but with different dependent > variables (attitudes). Advice much appreciated. -Howard Schuman > > ===================== > 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 > ===================== 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 |
|
All,
I have woken up to a couple of private emails with comments and questions. Let me be entirely clear in this post why a standard binary logistic regression is NOT appropriate in the design I have envisioned. I am assuming that EACH person was measured on BOTH dichotomous items. Hence you see two records for each subject ID in the dummy data set I posted previously. This introduces repeated measures, and one usually wants to account for correlation resulting from repeated measures. Treating observations as independent as one would do when fitting a standard binary logistic regression is usually an incorrect assumption. The multivariate model GEE I presented in the previous post accounts for the correlation introduced by repeated measures. Now, if my assumption that EACH person was measured on BOTH dichotomous outcomes is NOT correct, then we clearly no longer have repeated measures. I must admit that if this were true, I'd have some concerns about the prospect of testing for differences in age slopes across different samples on different outcomes. Back to the GEE I suggested in the previous post (assuming repeated measures)...I was also contacted by another person who suggested that one DV be coded as 0/1 while the other coded as 1/2. I would NOT do this. Simply code your DV, "Y," in 0s and 1s, as suggested in my original post. There is absolutely no need to change the coding scheme. If a data set is structured in wide format such as: ID Age DV1 DV2 1 19 0 1 2 20 1 0 3 22 1 1 . . . then an easy way to restructure the data set into long (aka vertical) format, as is required by the GENLIN procedure for this design, is to employ the VARSTOCASES function. Finally, if someone has a comment or question about my posts or another post in this thread, please post back to the entire list and not my private email. Ryan On Fri, Aug 6, 2010 at 5:44 PM, Ryan Black <[hidden email]> wrote: > Howard, > > You should be able to test for a significant difference in slopes by > fitting a multivariate model through the GENLIN procedure offered in > SPSS. > > You'll need to structure your data set as follows: > > ID Y_Indic Age Y > 1 1 24 0 > 1 2 24 1 > 2 1 33 1 > 2 2 33 0 > 3 1 28 0 > 3 2 28 1 > 4 1 16 1 > 4 2 16 1 > . > . > > Once you've structured your data set as described above, you can fit > the model using the following code: > > GENLIN Y (REFERENCE=FIRST) BY Y_Indic (ORDER=ASCENDING) WITH Age > /MODEL Y_Indic Age Y_Indic*Age INTERCEPT=YES > DISTRIBUTION=BINOMIAL LINK=LOGIT > /REPEATED SUBJECT=ID WITHINSUBJECT=Y_Indic SORT=YES > CORRTYPE=EXCHANGEABLE ADJUSTCORR=YES > /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION. > > The test associated with the Y_Indic*Age term will tell you if the > slopes are significantly different. > > This code is specifically designed to handle the data set I described. > Deviations from the presumed data set structure may require another > approach. > > Ryan > > On Thu, Aug 5, 2010 at 3:19 PM, howard schuman <[hidden email]> wrote: >> I have two independent logistic regression B values, and would like to >> test whether they differ significantly (even at p < .10), as indeed they >> do visually with one sloping up and the other down. I wonder if there is >> a fairly straightforward way to do this in SPSS, starting from the data >> set that includes both. Each line is based on just two points [i.e., two >> ages], which are the same for both lines, but with different dependent >> variables (attitudes). Advice much appreciated. -Howard Schuman >> >> ===================== >> 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 >> > ===================== 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 |
|
One more point--I failed to define the variables in the vertical data
set I proposed, which might be causing some confusion. I will do that now. ID = Subject ID Y_Indic = Response Indicator (1=first dependent variable and 2=second dependent variable) Age = Age of Subject (in years) Y = Actual Response So, using the data set structure I posted previously: ID Y_Indic Age Y 1 1 24 0 1 2 24 1 2 1 33 1 2 2 33 0 3 1 28 0 3 2 28 1 4 1 16 1 4 2 16 1 . . we see that Subject 1 (ID=1) is 24 years old, and scored a "0" on the first dependent variable and a "1" on the second dependent variable. Subject 2 (ID=2) is 33 years old, and scored a "1" on the first dependent variable and a "0" on the second dependent variable. HTH, Ryan On Sat, Aug 7, 2010 at 8:22 AM, Ryan Black <[hidden email]> wrote: > All, > > I have woken up to a couple of private emails with comments and > questions. Let me be entirely clear in this post why a standard binary > logistic regression is NOT appropriate in the design I have > envisioned. I am assuming that EACH person was measured on BOTH > dichotomous items. Hence you see two records for each subject ID in > the dummy data set I posted previously. This introduces repeated > measures, and one usually wants to account for correlation resulting > from repeated measures. Treating observations as independent as one > would do when fitting a standard binary logistic regression is usually > an incorrect assumption. The multivariate model GEE I presented in the > previous post accounts for the correlation introduced by repeated > measures. > > Now, if my assumption that EACH person was measured on BOTH > dichotomous outcomes is NOT correct, then we clearly no longer have > repeated measures. I must admit that if this were true, I'd have some > concerns about the prospect of testing for differences in age slopes > across different samples on different outcomes. > > Back to the GEE I suggested in the previous post (assuming repeated > measures)...I was also contacted by another person who suggested that > one DV be coded as 0/1 while the other coded as 1/2. I would NOT do > this. Simply code your DV, "Y," in 0s and 1s, as suggested in my > original post. There is absolutely no need to change the coding > scheme. > > If a data set is structured in wide format such as: > > ID Age DV1 DV2 > 1 19 0 1 > 2 20 1 0 > 3 22 1 1 > . > . > . > > then an easy way to restructure the data set into long (aka vertical) > format, as is required by the GENLIN procedure for this design, is to > employ the VARSTOCASES function. > > Finally, if someone has a comment or question about my posts or > another post in this thread, please post back to the entire list and > not my private email. > > Ryan > > On Fri, Aug 6, 2010 at 5:44 PM, Ryan Black <[hidden email]> wrote: >> Howard, >> >> You should be able to test for a significant difference in slopes by >> fitting a multivariate model through the GENLIN procedure offered in >> SPSS. >> >> You'll need to structure your data set as follows: >> >> ID Y_Indic Age Y >> 1 1 24 0 >> 1 2 24 1 >> 2 1 33 1 >> 2 2 33 0 >> 3 1 28 0 >> 3 2 28 1 >> 4 1 16 1 >> 4 2 16 1 >> . >> . >> >> Once you've structured your data set as described above, you can fit >> the model using the following code: >> >> GENLIN Y (REFERENCE=FIRST) BY Y_Indic (ORDER=ASCENDING) WITH Age >> /MODEL Y_Indic Age Y_Indic*Age INTERCEPT=YES >> DISTRIBUTION=BINOMIAL LINK=LOGIT >> /REPEATED SUBJECT=ID WITHINSUBJECT=Y_Indic SORT=YES >> CORRTYPE=EXCHANGEABLE ADJUSTCORR=YES >> /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION. >> >> The test associated with the Y_Indic*Age term will tell you if the >> slopes are significantly different. >> >> This code is specifically designed to handle the data set I described. >> Deviations from the presumed data set structure may require another >> approach. >> >> Ryan >> >> On Thu, Aug 5, 2010 at 3:19 PM, howard schuman <[hidden email]> wrote: >>> I have two independent logistic regression B values, and would like to >>> test whether they differ significantly (even at p < .10), as indeed they >>> do visually with one sloping up and the other down. I wonder if there is >>> a fairly straightforward way to do this in SPSS, starting from the data >>> set that includes both. Each line is based on just two points [i.e., two >>> ages], which are the same for both lines, but with different dependent >>> variables (attitudes). Advice much appreciated. -Howard Schuman >>> >>> ===================== >>> 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 >>> >> > ===================== 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 |
|
In reply to this post by Ryan
Ryan,
These were independent samples, as I conceptualize the problem, because respondents in this survey first recalled or did not recall one of two memories of national events, and the two were mutually exclusive (e.g., one might be World War II and the other might be the Vietnam War). Then each memory (as a dichotomy: recalled vs. did not recall) was regressed on age. The problem to be solved is whether the b values from the two regressions can be said to be different in terms of a p value. Howard Ryan Black wrote: > All, > > I have woken up to a couple of private emails with comments and > questions. Let me be entirely clear in this post why a standard binary > logistic regression is NOT appropriate in the design I have > envisioned. I am assuming that EACH person was measured on BOTH > dichotomous items. Hence you see two records for each subject ID in > the dummy data set I posted previously. This introduces repeated > measures, and one usually wants to account for correlation resulting > from repeated measures. Treating observations as independent as one > would do when fitting a standard binary logistic regression is usually > an incorrect assumption. The multivariate model GEE I presented in the > previous post accounts for the correlation introduced by repeated > measures. > > Now, if my assumption that EACH person was measured on BOTH > dichotomous outcomes is NOT correct, then we clearly no longer have > repeated measures. I must admit that if this were true, I'd have some > concerns about the prospect of testing for differences in age slopes > across different samples on different outcomes. > > Back to the GEE I suggested in the previous post (assuming repeated > measures)...I was also contacted by another person who suggested that > one DV be coded as 0/1 while the other coded as 1/2. I would NOT do > this. Simply code your DV, "Y," in 0s and 1s, as suggested in my > original post. There is absolutely no need to change the coding > scheme. > > If a data set is structured in wide format such as: > > ID Age DV1 DV2 > 1 19 0 1 > 2 20 1 0 > 3 22 1 1 > .. > .. > .. > > then an easy way to restructure the data set into long (aka vertical) > format, as is required by the GENLIN procedure for this design, is to > employ the VARSTOCASES function. > > Finally, if someone has a comment or question about my posts or > another post in this thread, please post back to the entire list and > not my private email. > > Ryan > > On Fri, Aug 6, 2010 at 5:44 PM, Ryan Black <[hidden email]> wrote: >> Howard, >> >> You should be able to test for a significant difference in slopes by >> fitting a multivariate model through the GENLIN procedure offered in >> SPSS. >> >> You'll need to structure your data set as follows: >> >> ID Y_Indic Age Y >> 1 1 24 0 >> 1 2 24 1 >> 2 1 33 1 >> 2 2 33 0 >> 3 1 28 0 >> 3 2 28 1 >> 4 1 16 1 >> 4 2 16 1 >> . >> . >> >> Once you've structured your data set as described above, you can fit >> the model using the following code: >> >> GENLIN Y (REFERENCE=FIRST) BY Y_Indic (ORDER=ASCENDING) WITH Age >> /MODEL Y_Indic Age Y_Indic*Age INTERCEPT=YES >> DISTRIBUTION=BINOMIAL LINK=LOGIT >> /REPEATED SUBJECT=ID WITHINSUBJECT=Y_Indic SORT=YES >> CORRTYPE=EXCHANGEABLE ADJUSTCORR=YES >> /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION. >> >> The test associated with the Y_Indic*Age term will tell you if the >> slopes are significantly different. >> >> This code is specifically designed to handle the data set I described. >> Deviations from the presumed data set structure may require another >> approach. >> >> Ryan >> >> On Thu, Aug 5, 2010 at 3:19 PM, howard schuman <[hidden email]> wrote: >>> I have two independent logistic regression B values, and would like to >>> test whether they differ significantly (even at p < .10), as indeed they >>> do visually with one sloping up and the other down. I wonder if there is >>> a fairly straightforward way to do this in SPSS, starting from the data >>> set that includes both. Each line is based on just two points [i.e., two >>> ages], which are the same for both lines, but with different dependent >>> variables (attitudes). Advice much appreciated. -Howard Schuman >>> >>> ===================== >>> 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 >>> > > ===================== > 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 > > ===================== 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 |
|
Howard,
So the subject was not permitted to recall both events? It had to be one or the other? If so, you are correct that you do not have a repeated measures design. Here's how I see your data set now: ID Memory_Type Age Recalled 1 1 61 0 2 2 70 1 3 2 59 1 4 1 82 0 . The binary logistic regression equation is simplified to: logit(y) = b0 + b1*Memory_Type + b2*Age + b3*Memory_Type*Age where Memory_Type is assumed to be dummy coded. (The LOGISTIC REGRESSION procedure in SPSS will dummy code for you) You could easily fit the model employing the LOGISTIC REGRESSION procedure as follows: LOGISTIC REGRESSION VARIABLES Y /METHOD=ENTER Age Memory_Type Age*Memory_Type /CONTRAST (Y_Indic)=Indicator. The test associated with the interm Memory_Type*Age term will answer your research question. From the description you provide, I wonder if respondents from one memory type are consistently much older than respondents from another memory type. Ryan On Sat, Aug 7, 2010 at 9:35 AM, howard schuman <[hidden email]> wrote: > Ryan, > > These were independent samples, as I conceptualize the problem, because > respondents in this survey first recalled or did not recall one of two > memories of national events, and the two were mutually exclusive (e.g., > one might be World War II and the other might be the Vietnam War). Then > each memory (as a dichotomy: recalled vs. did not recall) was regressed > on age. The problem to be solved is whether the b values from the two > regressions can be said to be different in terms of a p value. > Howard > > Ryan Black wrote: >> >> All, >> >> I have woken up to a couple of private emails with comments and >> questions. Let me be entirely clear in this post why a standard binary >> logistic regression is NOT appropriate in the design I have >> envisioned. I am assuming that EACH person was measured on BOTH >> dichotomous items. Hence you see two records for each subject ID in >> the dummy data set I posted previously. This introduces repeated >> measures, and one usually wants to account for correlation resulting >> from repeated measures. Treating observations as independent as one >> would do when fitting a standard binary logistic regression is usually >> an incorrect assumption. The multivariate model GEE I presented in the >> previous post accounts for the correlation introduced by repeated >> measures. >> >> Now, if my assumption that EACH person was measured on BOTH >> dichotomous outcomes is NOT correct, then we clearly no longer have >> repeated measures. I must admit that if this were true, I'd have some >> concerns about the prospect of testing for differences in age slopes >> across different samples on different outcomes. >> >> Back to the GEE I suggested in the previous post (assuming repeated >> measures)...I was also contacted by another person who suggested that >> one DV be coded as 0/1 while the other coded as 1/2. I would NOT do >> this. Simply code your DV, "Y," in 0s and 1s, as suggested in my >> original post. There is absolutely no need to change the coding >> scheme. >> >> If a data set is structured in wide format such as: >> >> ID Age DV1 DV2 >> 1 19 0 1 >> 2 20 1 0 >> 3 22 1 1 >> .. >> .. >> .. >> >> then an easy way to restructure the data set into long (aka vertical) >> format, as is required by the GENLIN procedure for this design, is to >> employ the VARSTOCASES function. >> >> Finally, if someone has a comment or question about my posts or >> another post in this thread, please post back to the entire list and >> not my private email. >> >> Ryan >> >> On Fri, Aug 6, 2010 at 5:44 PM, Ryan Black <[hidden email]> >> wrote: >>> >>> Howard, >>> >>> You should be able to test for a significant difference in slopes by >>> fitting a multivariate model through the GENLIN procedure offered in >>> SPSS. >>> >>> You'll need to structure your data set as follows: >>> >>> ID Y_Indic Age Y >>> 1 1 24 0 >>> 1 2 24 1 >>> 2 1 33 1 >>> 2 2 33 0 >>> 3 1 28 0 >>> 3 2 28 1 >>> 4 1 16 1 >>> 4 2 16 1 >>> . >>> . >>> >>> Once you've structured your data set as described above, you can fit >>> the model using the following code: >>> >>> GENLIN Y (REFERENCE=FIRST) BY Y_Indic (ORDER=ASCENDING) WITH Age >>> /MODEL Y_Indic Age Y_Indic*Age INTERCEPT=YES >>> DISTRIBUTION=BINOMIAL LINK=LOGIT >>> /REPEATED SUBJECT=ID WITHINSUBJECT=Y_Indic SORT=YES >>> CORRTYPE=EXCHANGEABLE ADJUSTCORR=YES >>> /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION. >>> >>> The test associated with the Y_Indic*Age term will tell you if the >>> slopes are significantly different. >>> >>> This code is specifically designed to handle the data set I described. >>> Deviations from the presumed data set structure may require another >>> approach. >>> >>> Ryan >>> >>> On Thu, Aug 5, 2010 at 3:19 PM, howard schuman <[hidden email]> >>> wrote: >>>> >>>> I have two independent logistic regression B values, and would like to >>>> test whether they differ significantly (even at p < .10), as indeed they >>>> do visually with one sloping up and the other down. I wonder if there is >>>> a fairly straightforward way to do this in SPSS, starting from the data >>>> set that includes both. Each line is based on just two points [i.e., two >>>> ages], which are the same for both lines, but with different dependent >>>> variables (attitudes). Advice much appreciated. -Howard Schuman >>>> >>>> ===================== >>>> 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 >>>> >> >> ===================== >> 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 >> >> > > ===================== > 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 > ===================== 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 |
|
Hi Howard,
Small correction to the LOGISTIC REGRESSION code I posted. You need to replace "Y_Indic" with "Memory_Type." So, the full code should look like this: LOGISTIC REGRESSION VARIABLES Y /METHOD=ENTER Age Memory_Type Age*Memory_Type /CONTRAST (Memory_Type)=Indicator. I still have some concerns about this design. Anyway assuming it is valid, as I mentioned before, the interaction term should answer your question. HTH, Ryan On Sat, Aug 7, 2010 at 10:02 AM, Ryan Black <[hidden email]> wrote: > Howard, > > So the subject was not permitted to recall both events? It had to be > one or the other? If so, you are correct that you do not have a > repeated measures design. Here's how I see your data set now: > > ID Memory_Type Age Recalled > 1 1 61 0 > 2 2 70 1 > 3 2 59 1 > 4 1 82 0 > . > > The binary logistic regression equation is simplified to: > > logit(y) = b0 + b1*Memory_Type + b2*Age + b3*Memory_Type*Age > > where Memory_Type is assumed to be dummy coded. (The LOGISTIC > REGRESSION procedure in SPSS will dummy code for you) > > You could easily fit the model employing the LOGISTIC REGRESSION > procedure as follows: > > LOGISTIC REGRESSION VARIABLES Y > /METHOD=ENTER Age Memory_Type Age*Memory_Type > /CONTRAST (Y_Indic)=Indicator. > > The test associated with the interm Memory_Type*Age term will answer > your research question. > > From the description you provide, I wonder if respondents from one > memory type are consistently much older than respondents from another > memory type. > > Ryan > > On Sat, Aug 7, 2010 at 9:35 AM, howard schuman <[hidden email]> wrote: >> Ryan, >> >> These were independent samples, as I conceptualize the problem, because >> respondents in this survey first recalled or did not recall one of two >> memories of national events, and the two were mutually exclusive (e.g., >> one might be World War II and the other might be the Vietnam War). Then >> each memory (as a dichotomy: recalled vs. did not recall) was regressed >> on age. The problem to be solved is whether the b values from the two >> regressions can be said to be different in terms of a p value. >> Howard >> >> Ryan Black wrote: >>> >>> All, >>> >>> I have woken up to a couple of private emails with comments and >>> questions. Let me be entirely clear in this post why a standard binary >>> logistic regression is NOT appropriate in the design I have >>> envisioned. I am assuming that EACH person was measured on BOTH >>> dichotomous items. Hence you see two records for each subject ID in >>> the dummy data set I posted previously. This introduces repeated >>> measures, and one usually wants to account for correlation resulting >>> from repeated measures. Treating observations as independent as one >>> would do when fitting a standard binary logistic regression is usually >>> an incorrect assumption. The multivariate model GEE I presented in the >>> previous post accounts for the correlation introduced by repeated >>> measures. >>> >>> Now, if my assumption that EACH person was measured on BOTH >>> dichotomous outcomes is NOT correct, then we clearly no longer have >>> repeated measures. I must admit that if this were true, I'd have some >>> concerns about the prospect of testing for differences in age slopes >>> across different samples on different outcomes. >>> >>> Back to the GEE I suggested in the previous post (assuming repeated >>> measures)...I was also contacted by another person who suggested that >>> one DV be coded as 0/1 while the other coded as 1/2. I would NOT do >>> this. Simply code your DV, "Y," in 0s and 1s, as suggested in my >>> original post. There is absolutely no need to change the coding >>> scheme. >>> >>> If a data set is structured in wide format such as: >>> >>> ID Age DV1 DV2 >>> 1 19 0 1 >>> 2 20 1 0 >>> 3 22 1 1 >>> .. >>> .. >>> .. >>> >>> then an easy way to restructure the data set into long (aka vertical) >>> format, as is required by the GENLIN procedure for this design, is to >>> employ the VARSTOCASES function. >>> >>> Finally, if someone has a comment or question about my posts or >>> another post in this thread, please post back to the entire list and >>> not my private email. >>> >>> Ryan >>> >>> On Fri, Aug 6, 2010 at 5:44 PM, Ryan Black <[hidden email]> >>> wrote: >>>> >>>> Howard, >>>> >>>> You should be able to test for a significant difference in slopes by >>>> fitting a multivariate model through the GENLIN procedure offered in >>>> SPSS. >>>> >>>> You'll need to structure your data set as follows: >>>> >>>> ID Y_Indic Age Y >>>> 1 1 24 0 >>>> 1 2 24 1 >>>> 2 1 33 1 >>>> 2 2 33 0 >>>> 3 1 28 0 >>>> 3 2 28 1 >>>> 4 1 16 1 >>>> 4 2 16 1 >>>> . >>>> . >>>> >>>> Once you've structured your data set as described above, you can fit >>>> the model using the following code: >>>> >>>> GENLIN Y (REFERENCE=FIRST) BY Y_Indic (ORDER=ASCENDING) WITH Age >>>> /MODEL Y_Indic Age Y_Indic*Age INTERCEPT=YES >>>> DISTRIBUTION=BINOMIAL LINK=LOGIT >>>> /REPEATED SUBJECT=ID WITHINSUBJECT=Y_Indic SORT=YES >>>> CORRTYPE=EXCHANGEABLE ADJUSTCORR=YES >>>> /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION. >>>> >>>> The test associated with the Y_Indic*Age term will tell you if the >>>> slopes are significantly different. >>>> >>>> This code is specifically designed to handle the data set I described. >>>> Deviations from the presumed data set structure may require another >>>> approach. >>>> >>>> Ryan >>>> >>>> On Thu, Aug 5, 2010 at 3:19 PM, howard schuman <[hidden email]> >>>> wrote: >>>>> >>>>> I have two independent logistic regression B values, and would like to >>>>> test whether they differ significantly (even at p < .10), as indeed they >>>>> do visually with one sloping up and the other down. I wonder if there is >>>>> a fairly straightforward way to do this in SPSS, starting from the data >>>>> set that includes both. Each line is based on just two points [i.e., two >>>>> ages], which are the same for both lines, but with different dependent >>>>> variables (attitudes). Advice much appreciated. -Howard Schuman >>>>> >>>>> ===================== >>>>> 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 >>>>> >>> >>> ===================== >>> 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 >>> >>> >> >> ===================== >> 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 >> > ===================== 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 |
|
BETWEEN GROUP DESIGN Group A either remember, 1, or do not remember, 0, event of type A [same event for everyone], age is noted Group B either remember, 1, or do not remember, 0, event of type B [same event for everyone], age is noted Data Structure [long, event type B below event type A] Id age type recall Analysis [using dialogue boxes for simplicity] Regression>binarylogistic Dependent: recall Covariates: age type(cat) age*type Results Type gives MAIN effect of even type Age gives main effect of age as slope of regression of logit(recall) on age. Could be FLAT if older better at type A and yunger at type B Age*type gives difference in slopes of regression of logit(recall) on age for types A & B Textbook stuff, no controversy WITHIN GROUP DESIGN All participants given TWO tasks. They either remember, 1, or do not remember, 0, event of type A [same event for everyone] AND either remember, 1, or do not remember, 0, event of type B [same event for everyone], age is noted There are, in my view, THREE different potential analyses to determine differences of effect of age for the two types of memory event ANALYSIS METHOD 1 Do exactly the same as for between group design and do no worry about the correlation between data for two events Data is in long form Id age type recall 1 24 A 1 1 24 B 0 2 37 A 1 2 37 B 1.... Its like independent t-test for related groups. Not uninformative, but not ideal [my guess is that if one does an inappropriate independent t-test on correlated data, one gets same results on 75%+ of occasions] ANALYSIS METHOD 2 Set up data as for 1 and include id(cat) in model Results interpretted as in method 1, but participant main effect is partialled out. This is an approximation a true multilevel approach, which is more complex and should be doable in generaliZED linear models. ANALYSIS METHOD 3 Model interaction explicitly, this is extention of the McNemar method, which I am suggesting here for the first time but may have been suggested by others Create TWO new variables for each participant Agree =1, if both recall A and recall B = 1; 0 if both = 0, and missing otherwise Discord = 1, if A=0, B=1; and 0, if A=1 and B = 0, and missing otherwise Data structure [wide] id age recA recB agree discord 1 24 1 0 missing 0 2 37 1 1 1 missing Then SEPARATE logistic regressions for agree and discord, both with age as a single covariate Effect on agree gives main effect of age on both types of memory combined Effect on discord gives effect of age on discrepancy between A & B. This is not the SAME as difference in slope for memory types, b ut if effect is significant I would be confident about taking the numeric difference in slope seriously. Note that total frequencies of discord = 1 and discord =2 can be used to determine the association between memory types collapsed over age. Such problems may be better discussed in the works of Agresti, previously noted. Do not know what he would think of method 3 Best Diana Professor Diana Kornbrot email: d.e.kornbrot@... web: http://web.me.com/kornbrot/KornbrotHome.html Work Centre for Lifespan & Chronic Illness Research, CLiCIR School of Psychology University of Hertfordshire College Lane, Hatfield, Hertfordshire AL10 9AB, UK voice: +44 (0) 170 728 4626 Home 19 Elmhurst Avenue London N2 0LT, UK voice: +44 (0) 208 883 3657 mobile: +44 (0) 7855 415 425 fax: +44 (0) 870 706 4997 |
| Free forum by Nabble | Edit this page |
