turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Accounting for Different Levels of Twin Relatednes...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-01-2014 05:59 PM

I have a dataset with a number of identical twin pairs and fraternal twin pairs. I want to examine the relationship between two variables (let's call them INDEPENDENT and DEPENDENT). However, I can't run a normal OLS regression because each twin's dependent variable is correlated with their co-twin's.

The way I have been dealing with this is to use SAS PROC MIXED and include a random intercept defined by twin pair (FAMILYID). Here is my syntax:

`proc mixed method=ml covtest noclprint;<br>`

class FAMILYID; <br>

model DEPENDENT = INDEPENDENT/solution;<br>

random intercept/sub=FAMILYID type=un gcorr;<br>

run;

However, I've realized that I have a heteroskedasticity problem. The identical twins are likely to be more related to each other than the fraternal twins (variable indicating whether twins are fraternal or identical is called TWINTYPE), and the model doesn't reflect this.

According to SAS documentation for the RANDOM statement: "GRP=effect defines an effect specifying heterogeneity in the covariance structure of **G**. All observations having the same level of the group effect have the same covariance parameters."

It sounds like this is exactly what I want. However, I am confused how this relates to the REPEATED statement and whether I need to use the REPEATED statement with "GROUP" instead of "RANDOM" or in addition to random. Conceptually, what are each of these doing and are they redundant for my purposes?

Accepted Solutions

Solution

09-09-2014
12:45 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-09-2014 12:45 PM

Change the repeated statement by deleting the type=un option. With that option in place, it calculates some covariances that actually do not exist in a twin study. With that out, you should get four covariance parameters:

Fraternal twin variance component

Identical twin variance component

Fraternal twin residual variance

Identical twin residual variance

If you do NOT get this, then please attach a copy of your output, and I will try to figure out what is going on.

Steve Denham

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-02-2014 09:24 AM

You will probably have to add an additional variable the identifies the twin pair as homozygous or heterozygous. For now call it twintype. Then the following would work:

`proc mixed method=ml covtest noclprint;`

class FAMILYID twintype;

model DEPENDENT = INDEPENDENT/solution;

random intercept/sub=FAMILYID type=un group=twintype gcorr;

run;

` `

`I am a bit on the fence about specifying type=un here, as FAMILYID only adds a variance component to your design, so far as I can tell. I would recommend removing it. The resulting random statement should give two variance components, derived from the twintype dichotomy. `

` `

`Steve Denham`

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-07-2014 01:59 PM

Thank you, thank you, for this helpful response! I do have a follow-up question for clarification, and my apologies if this reveals some misunderstanding on my part as I'm still learning about mixed models.

When I IGNORE the twin type and just include a random intercept reflecting that each person in the study is part of a "family cluster" (as below):

proc mixed method=ml covtest noclprint;

class FAMILYID;

model DEPENDENT = INDEPENDENT/solution;

random intercept/sub=FAMILYID type=un gcorr;

run;

I get a covariance parameter estimate for the "FAMILYID" as well as a residual term. My understanding is that this decomposes the variability into "within-cluster" variability (residual estimate) and "between-cluster" variability (FAMILYID estimate). I get the intraclass correlation coefficient between my family clusters by computing: (FAMILYID estimate) divided by (FAMILYID estimate + residual estimate).

When I use the syntax you suggested

proc mixed method=ml covtest noclprint;<br>

class FAMILYID; <br>

model DEPENDENT = INDEPENDENT/solution;<br>

random intercept/sub=FAMILYID group=TWINTYPE type=un gcorr;<br>

run;

and look at my covariance parameters, I get one FAMILYID estimate for fraternal twins, one FAMILYID estimate for identical twins, and one residual term. So -- this means that I have told my model to make different "between-cluster" estimates for identical and fraternal twins -- but isn't it still disregarding twin type when it calculates the residual term? And if the residual term reflects the "within-cluster" variability, isn't it a problem that it doesn't take into consideration that there is likely to be LESS variability within an identical twin pair on the outcome variable and MORE variability within a fraternal twin pair?

So I guess my follow-up question is: is there syntax that would leave me with a between-cluster estimate for identical twins and fraternal twins, and then a residual term for identical twins and fraternal twins? OR, am I confused as to why this would be needed?

Additional help/clarification much appreciated. THANKS!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-08-2014 08:38 AM

One way to get separate residual terms would be to fit a REPEATED statement ( in addition to the current RANDOM) statement.

Try adding:

REPEATED / group=twintype; /* May or may not want a subject= in this. For now, I think not. */

and see if this gives a heterogeneous error structure for the two twintypes.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-08-2014 07:46 PM

Ah! Thank you for verifying that the REPEATED statement is where I can manipulate the residual term.

I tried the syntax above, and unfortunately, when I run it, I don't get any tests of fix effects or covariance parameter estimates or anything. I get a log message that says:

"An infinite likelihood is assumed in iteration 0 because of a nonpositive definite

estimated R matrix for Subject 606"

I googled this and it seems like it might be because the "TWINTYPE" variable is coded the same way across each individual? My dataset is such that each line corresponds to an individual, and then there's a variable that indicates which family they are a part of and another variable that indicates whether their pair is fraternal or identical.

I tried this syntax:

proc mixed method=ml covtest noclprint;

class FAMILYID;

model DEPENDENT = INDEPENDENT/solution;

random intercept/sub=FAMILYID group=TWINTYPE type=un gcorr;

repeated/sub=FAMILYID group=TWINTYPE type=un rcorr;

run;

and the model successfully ran, but it spit out eight different covariance parameter estimates. Conceptually, I'm having trouble understanding what these would correspond to and how I'd calculate the intraclass correlation coefficient like I did when I just had the random statement to worry about.

Again, many thanks for your reply.

Solution

09-09-2014
12:45 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-09-2014 12:45 PM

Change the repeated statement by deleting the type=un option. With that option in place, it calculates some covariances that actually do not exist in a twin study. With that out, you should get four covariance parameters:

Fraternal twin variance component

Identical twin variance component

Fraternal twin residual variance

Identical twin residual variance

If you do NOT get this, then please attach a copy of your output, and I will try to figure out what is going on.

Steve Denham

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

09-10-2014 12:09 AM

Yes, this worked!!!!

Thank you so much for your help. I've searched long and hard on the internet for help with this question.