Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# Re: st: Nested design problem

 From Ángel Rodríguez Laso To statalist@hsphsun2.harvard.edu Subject Re: st: Nested design problem Date Fri, 16 Nov 2012 16:07:09 +0100

```Hi Steven,

Couldn't you build from the second table a measure of closeness for
each individual? Depending on your theoretical framework, that could
be total closeness scores, mean closeness across relationships or
number of relationships over a threshold.

Best regards,

Angel Rodriguez-Laso

2012/11/15 Steven Raemaekers <s.raemaekers@sig.eu>:
> Hello,
>
> I do not know where else to post this problem so I hope somebody can help me here. I have a statistical design issue which is as follows.
> As an example, let's say I have a table with information on people in the following format:
>
> Id                      IQ              Introvertness           …
> person1         120             80                              …
> person2         110             70                              …
> person3         130             40                              …
>
> This table contains a number of properties of certain persons, each person is a unique entry in this table. I also have a table which contains relationships between those persons:
>
> Id1             Id2             Closeness
> person1 person2 80
> person1 person3 70
>
> "Closeness" is a property of the relationship between person1 and person2. The numbers do not make sense but are just for illustration.
>
> Now I want to test whether people that are in relationships "closer" to each other are more intelligent. I also possibly want to take into account other properties of people.
> In regression terms: I want to regress the dependent variable IQ on the independent variable closeness and introvertness. How can I do this?
>
> The problem is, persons can appear multiple time in the list so applying normal linear regression or correlation on this table produces incorrect results.
> Additionally, there are two sides to the relationship, so there is a connection between the IQ of person1, the closeness of their relationship and the IQ of person2.
> I believe the thing I need is called a nested hierarchical model/mixed model, but I have no idea how to design this.
>
> My questions are therefore the following:
> 1) What statistical test do I need to test my hypothesis on this data?
> 2) What assumptions does this test make and how can I check these assumptions?
> 3) How should I format my data?
> 4) What are the commands in Stata to execute this test?
>
> Thanks very much!
>
> Regards,
>
> Steven Raemaekers
> PhD student
> Software Improvement Group/TU Delft
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/
```