In this lab, you’ll be building, estimating, and interpreting actor-based longitudinal network models using RSiena.1 Tom Snijders has led the development of the Siena framework, with RSiena supplanting a specialized Windows program in 2011. You can learn more about RSiena, research using the framework, and more here. RSiena is used to model actor-based longitudinal network models in order to examine the effects of network ties over time on a certain behavior, or the effect of a certain behavior on tie formation over time. SIENA stands for Simulation Investigation for Empirical Network Analysis.
You will be using an excerpt of data from the Teenage Friends and Lifestyle Study.2 You can learn more about this data set, created by Prof. Snijders, here. The data set includes 3 network files containing friendship relationships between 50 teenage girls recorded at 3 consecutive points in time.
s50-network1.dat
s50-network2.dat
s50-network23.dat
The data also includes information about the smoking behavior of the 50 female students (s50-smoke.dat). The smoking variable has three levels: 1 (does not smoke), 2 (smokes occasionally) and 3 (smokes regularly).
The core analysis conducted in this lab consists of taking a set of intuitive or plain language hypotheses about our data set and converting them into hypotheses in network terminology. Once we have our hypotheses, we will operationalize them into parameters in our model. Finally, we will interpret these results by testing our hypotheses.
First, we will create testable hypotheses based on intuitions about habit and friendship formation.
Formulate hypotheses using network terminology discussed throughout the course based on the following friendship relations.3 If you get stuck, it may be helpful to look at the terms included in the model below for hints on how to translate plain-language intuitions into network terminology. The first one is done for you:
Hypothesis 1: Ties between students are not random.
Relational Hypotheses:
Hypothesis 2: The network will exhibit significant reciprocity.
Hypothesis 3:
Hypothesis 4: Smokers will have low out degree centrality scores.
Hypothesis 5:
Hypothesis 6: The network will exhibit significant homophily.
Smoking Behavior Hypotheses:
Hypothesis 7: Age will be a significant predictor of smoking.
Hypothesis 8: Node attribute homophily.
To better intuitively understand our network, let’s examine three network visualizations showing the friendship network over time and the smoking behavior of the nodes.
Let’s visualize our network at the three time periods under discussion. Node size increases with smoking behavior. Green nodes represent no smoking, yellow nodes represent light smoking, and red nodes represent heavy smoking. Think about the macro-level features of each network.
Which two nodes represent isolates in the network at all three time periods?
Nodes V20 and V13 are isolates in all three graphs.
Describe the change in the network over time. Think about the formation of clusters and the incidence of smoking behavior.
From t1 to t2 the most notable change is that the network largely becomes one component with a few exceptions. In t2, there has formed small pockets of smokers, most of which are now heavy smokers. By t3, the heavy smokers have created a small clique and a separate component. The bottom right hand component predominantly composed of smokers will refer to as “Smoker’s Island”. Smoker’s Island has only a few nonsmokers left. Most of the nonsmokers have grouped by t3 into either their own component or a clique on the main large component.
Using the three visualizations, evaluate hypothesis five.
From just eyeballing the graphs, hypothesis 5 appears to be supported.
To build a SIENA model, we need to create dependent variables, explanatory variables, a combination of both types of variables, and our model specification.
First, we create a SIENA data object including the longitudinal friendship network and the smoking behavioral variable. The results of creating that model, smokeBehXfriendship:
## Dependent variables: friendship, smokingbeh
## Number of observations: 3
##
## Nodeset Actors
## Number of nodes 50
##
## Dependent variable friendship
## Type oneMode
## Observations 3
## Nodeset Actors
## Densities 0.046 0.047 0.05
##
## Dependent variable smokingbeh
## Type behavior
## Observations 3
## Nodeset Actors
## Range 1 - 3
Using our hypotheses above, we will construct a list of parameters to test using our Siena model. A table of those parameters follows:
## name effectName include fix test
## 1 friendship constant friendship rate (period 1) TRUE FALSE FALSE
## 2 friendship constant friendship rate (period 2) TRUE FALSE FALSE
## 3 friendship outdegree (density) TRUE FALSE FALSE
## 4 friendship reciprocity TRUE FALSE FALSE
## 5 friendship smokingbeh alter TRUE FALSE FALSE
## 6 friendship smokingbeh ego TRUE FALSE FALSE
## 7 friendship same smokingbeh TRUE FALSE FALSE
## 8 smokingbeh rate smokingbeh (period 1) TRUE FALSE FALSE
## 9 smokingbeh rate smokingbeh (period 2) TRUE FALSE FALSE
## 10 smokingbeh smokingbeh linear shape TRUE FALSE FALSE
## 11 smokingbeh smokingbeh quadratic shape TRUE FALSE FALSE
## 12 smokingbeh smokingbeh total similarity TRUE FALSE FALSE
## initialValue parm
## 1 4.69604 0
## 2 4.32885 0
## 3 -1.46770 0
## 4 0.00000 0
## 5 0.00000 0
## 6 0.00000 0
## 7 0.00000 0
## 8 0.81720 0
## 9 0.43579 0
## 10 -0.22314 0
## 11 0.00000 0
## 12 0.00000 0
Next, we will create our model. You can learn about the function that creates Siena models by typing ?sienaModelCreate into your R console.
## Estimates, standard errors and convergence t-ratios
##
## Estimate Standard Convergence
## Error t-ratio
## Network Dynamics
## 1. rate constant friendship rate (period 1) 5.7695 ( 1.0042 ) 0.0255
## 2. rate constant friendship rate (period 2) 4.5052 ( 0.6999 ) 0.0009
## 3. eval outdegree (density) -2.7759 ( 0.2853 ) 0.0568
## 4. eval reciprocity 2.7647 ( 0.1920 ) 0.0461
## 5. eval smokingbeh alter 0.1104 ( 0.1546 ) -0.0365
## 6. eval smokingbeh ego 0.1263 ( 0.1694 ) -0.0403
## 7. eval same smokingbeh 0.7065 ( 0.3785 ) 0.0834
##
## Behavior Dynamics
## 8. rate rate smokingbeh (period 1) 3.0680 ( 1.3237 ) -0.0183
## 9. rate rate smokingbeh (period 2) 2.9927 ( 1.6025 ) -0.0548
## 10. eval smokingbeh linear shape -1.3643 ( 0.5288 ) -0.0037
## 11. eval smokingbeh quadratic shape 1.9306 ( 0.4257 ) 0.0146
## 12. eval smokingbeh total similarity 1.1043 ( 0.6295 ) 0.0078
##
## Overall maximum convergence ratio: 0.1096
##
##
## Total of 3060 iteration steps.
We need to check the convergence ratios in the final column to evaluate the reliability of our simulation. Individual t-ratios should be less than the absolute value of .1. The overall maximum convergence ratio should be less than .25.
The model has converged as every t-ratio is below .1 and the overall maximum convergence ratio is .21 which is < .25.
Has your model converged sufficiently? If not, note which terms have not converged, rerun your model using the previous Siena model values as your starting point, and re-evaluate. Repeat this process until the overall maximum convergence ratio and the convergence t-ratio for each term are within acceptable levels.4 If your model has not converged, uncomment prevAns = ans1 in the code block titled Model Creation and rerun that block of code and print results. This will use the previous values generated by the previous model creation as the starting point in the estimation and proceed through the model construction process again. See pp. 58—59 of the RSiena manual for more information.
The model has converged sufficiently on the first try.
The Estimate column, also reported as the theta vector within an RSiena object’s effects vector, represents the chance of an actor forming a tie within the network based on interactions within and between networks or in relation to the presence or absence of a behavior. The Standard Error column provides information about the amount of variation among actors within the network on the given parameter.
The following table presents the Estimate (theta) score from the preceding table, divided by Standard Error. Recall that when carrying out a t-test, a parameter is significant at the .05 level when the absolute value of the t-score is greater than 2.
| sigvalues | |
|---|---|
| constant friendship rate (period 1) | 5.75 |
| constant friendship rate (period 2) | 6.44 |
| outdegree (density) | -9.73 |
| reciprocity | 14.40 |
| smokingbeh alter | 0.71 |
| smokingbeh ego | 0.75 |
| same smokingbeh | 1.87 |
| rate smokingbeh (period 1) | 2.32 |
| rate smokingbeh (period 2) | 1.87 |
| smokingbeh linear shape | -2.58 |
| smokingbeh quadratic shape | 4.54 |
| smokingbeh total similarity | 1.75 |
For each of your hypotheses, indicate which parameter operationalizes your hypothesis. Using the tables created above, evaluate that hypothesis, and report whether your results were significant.5 If you’re having difficulty matching up parameters with your hypotheses, take a look at pp. 41-49, § 6.2, in the RSiena Manual.
outdegree= transitivity reciprocity= reciprocity quadratic= age hyp 8 = total similarity
Hypothesis 1: Ties between students are not random.
As the sigvalues of the constant friendship rates are significant, above |2|, the hypothesis is supported.
Relational Hypotheses:
Hypothesis 2: The network will exhibit significant reciprocity.
Reciprocity is very significant with a score of 13.
Hypothesis 4: Smokers will have low out degree centrality scores.
The outdegree density is significant supporting hypothesis 4.
Hypothesis 6: The network will exhibit significant homophily.
samesmokingbeh is not significant, but it is trending towards significance at 1.92.
Smoking Behavior Hypotheses:
Hypothesis 7: Age will be a significant predictor of smoking.
I don’t see any variable for age.
Hypothesis 8: Node attribute assimilation.
smokingbeh total similarity is not significant, so there’s no support for hypothesis 8.
After knitting your file to RPubs, copy the URL and paste it into the comment field of the Lab 2 Assignment on Canvas. Save this .Rmd file and submit it in the file portion of your Canvas assignment. Make sure to review your file and its formatting. Run spell check (built into RStudio) and proofread your answers before submitting. If you can’t publish to RPubs, save your HTML file as a PDF and submit that instead.6 There are many different ways to do this with different browsers. Google it.