The goal of this workshop is to introduce you to longitudinal social network analysis.
The stochastic actor-oriented model was developed by Tom Snijders and colleagues. Its purpose is to represent network dynamics based on observed longitudinal data, and to draw conclusions about the analyzed populations based on the model. Variants of SAOM for multiplex data (co-evolution of edges) and for modeling networks collected in different groups (e.g., different classrooms) exists. The following assumptions hold for SAOM models:
The temporal exponential random graph model was developed by Steve Hanneke and colleagues and is an extension to the simple exponential random graph model (ERGM). In simple terms, ERGM is a logistic regression that calculates the probability that an edge is present or absent based on the network structure and covariates. TERGM is an extension of ERGM.
TERGM and SAOM are pretty similar. Below a description of their differences to aid when one method is more appropriate than the other:
While from a theoretical perspective, SAOM outperforms TERGM, testing of the two models using real data showed that TERGM more accurately predicted edges.
variants for “multiplex”, “multi-relational”, or “multi-level” ERGMs as well (Wang et al. 2013), but they have not yet been extended to the temporal case.
The relational event model was developed by Carter T Butts and colleagues. It focuses on behavioral interactions, which are defined as discrete events directed at a person or a group of people. It assumes that past interactions create the context for future interactions. This means that every action that occurs depends on the action which occurred right before it. The following assumptions apply:
Below is a short example of the steps necessary to run a SAOM. The data represents interaction between team members in several student teams. Each team consisted of around five master students and worked on a project for a client. The network was collected at the beginning of the course (t0), 3 weeks into the course (t1), and at the end of the course in week 7, before the grades were published (t2). More information about the context is available in Unbundling Information Exchange in Ad Hoc Project Teams.
The variables we collected were information retrieval and information allocation (dependent variables), awareness of team member’s expertise (knowing, independent variable), the importance team member’s attach to each other’s expertise (valuing, independent variable), how adaptive individuals are (adaptive expertise, independent variable), their emotional attachment to their group (social identity, independent variable), and background variables (gender, age, nationality, specialization, control variable).
We analyzed the data using a hierarchical stochastic actor oriented model using Bayesian regression. We made this choice due to the small size of network. While we had two dependent variables, we did not have enough data to calculate a co-evolution model, thus we could not estimate how information retrieval and information allocation influence each other. In place of this we calculated two models, one for information allocation and one for information retrieval.
For this workshop we will be focusing on modeling information retrieval for three teams using only valuing, and adaptive expertise as dependent variables. Running the complete model, as conducted in the linked study, was computational intensive.
In general, the steps are: 1. Import the data 2. Specify independent, dependent variables 3. Select the effects and specify the model 4. Test goodness of fit
We will first load the required packages and set our working directory.
If you don’t have the packages installed, run this line. If this fails, check the error message. Did a package that is needed for RSienaTest to run, fail to install? If this fails with a non-zero exist status and you have a mac, do you have the development tools (xcode) installed?
getwd()
## [1] "/Users/katerinadoyle/Dropbox/asc2018_longsna"
setwd("/Users/katerinadoyle/Dropbox/asc2018_longsna")
#install.packages("RUnit")
#install.packages("RSienaTest", repos="http://R-Forge.R-project.org", dependencies=T)
Use setwd to set the path to your working directory. For example, setwd("~/Dropbox/longitudinal_sna_asc_workshop/data"). In windows this would look like setwd("c:/Dropbox/longitudinal_sna_asc_workshop/data"). If you are unsure about your working directory you can type getwd in the console.
library(RSienaTest)
We begin with loading the data. A couple of words about the code to import the data. All the data about one variable for one team is assigned to one object (variable name <- as.matrix(...)). read.csv reads the data about one team. I have for each team one txt file. Therefore, I need to skip some rows (skip = 4) and tell the program how many rows to import (nrows = 4). I also need to add row names (row.names = 1) and column names (col.names = c(name1, name2, etc.)). I’m ok with having row names and column names that have the same names (check.names=FALSE). While not important, I’m telling R to convert string variables into dummy variables (stringsAsFactors =TRUE). That is not important as I don’t have any string variables. The only string are the header variables, and I indicated them. All data about one team is imported in one list (list(....)) to make the cleaning easier.
Network variables
adulteduc<-list(
#adulteduc t1
ae_val1<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-5.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Daniel", "Liga", "Shengye", "Valentina") , skip=4, nrows=4, check.names=FALSE), stringsAsFactors=TRUE),
ae_is1<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-5.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Daniel", "Liga", "Shengye", "Valentina") , skip=14, nrows=4, check.names=FALSE), stringsAsFactors=TRUE),
#aduleteduc t2
ae_val2<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-5.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Daniel", "Liga", "Shengye", "Valentina") , skip=24, nrows=4, check.names=FALSE), stringsAsFactors=TRUE),
ae_is2<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-5.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Daniel", "Liga", "Shengye", "Valentina") , skip=34, nrows=4, check.names=FALSE), stringsAsFactors=TRUE),
#aduleteduc t3
ae_val3<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-5.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Daniel", "Liga", "Shengye", "Valentina") , skip=44, nrows=4, check.names=FALSE), stringsAsFactors=TRUE),
ae_is3<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-5.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Daniel", "Liga", "Shengye", "Valentina") , skip=54, nrows=4, check.names=FALSE), stringsAsFactors=TRUE)
)
alpheus<-list(
#Alpehus t1
alp_val1<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-6.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Sarah", "Harmke", "Sybil", "Sanne") , skip=4, nrows=4, check.names=FALSE), stringsAsFactors=TRUE),
alp_is1<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-6.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Sarah", "Harmke", "Sybil", "Sanne") , skip=14, nrows=4, check.names=FALSE), stringsAsFactors=TRUE),
#Alpehus t2
alp_val2<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-6.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Sarah", "Harmke", "Sybil", "Sanne") , skip=24, nrows=4, check.names=FALSE), stringsAsFactors=TRUE),
alp_is2<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-6.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Sarah", "Harmke", "Sybil", "Sanne") , skip=34, nrows=4, check.names=FALSE), stringsAsFactors=TRUE),
#Alpehus t3
alp_val3<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-6.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Sarah", "Harmke", "Sybil", "Sanne") , skip=44, nrows=4, check.names=FALSE), stringsAsFactors=TRUE),
alp_is3<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-6.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Sarah", "Harmke", "Sybil", "Sanne") , skip=54, nrows=4, check.names=FALSE), stringsAsFactors=TRUE)
)
hht<-list(
#hht T1
hht_val1<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-7.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Anja","Johanna","Erika","Esmina","Saulius") , skip=5, nrows=5, check.names=FALSE), stringsAsFactors=TRUE),
hht_is1<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-7.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Anja","Johanna","Erika","Esmina","Saulius") , skip=17, nrows=5, check.names=FALSE), stringsAsFactors=TRUE),
#hht T2
hht_val2<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-7.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Anja","Johanna","Erika","Esmina","Saulius") , skip=29, nrows=5, check.names=FALSE), stringsAsFactors=TRUE),
hht_is2<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-7.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Anja","Johanna","Erika","Esmina","Saulius") , skip=41, nrows=5, check.names=FALSE), stringsAsFactors=TRUE),
#hht T3
hht_val3<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-7.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Anja","Johanna","Erika","Esmina","Saulius") , skip=53, nrows=5, check.names=FALSE), stringsAsFactors=TRUE),
hht_is3<-as.matrix(read.csv("data/ae_teamdynamics_MASTER_UCINET-7.txt",na.strings=9, sep = ";", dec=",", row.names=1, col.names=c("row.nameS", "Anja","Johanna","Erika","Esmina","Saulius") , skip=65, nrows=5, check.names=FALSE), stringsAsFactors=TRUE)
)
Actor attributes
attributes<-read.csv("data/attributes_article.csv", header=TRUE, row.names=1)
ae_att<-subset(attributes, team =="adult education")
alp_att<-subset(attributes, team =="alpheus")
hht_att<-subset(attributes, team =="hht")
Now that we have the data we need to prepare it. The network variables are valued ranging from 2 (rarely for information retrieval and strongly disagree for valuing) to 6 (very frequent for information retrieval and strongly agree for valuing). While it is possible to do SAOM with valued data I did the simpler route and dichotomized my networks.
Below we define a simple function dicoGT4 that takes a matrix and changes all values above 4 to 1 and the other values to 0. We apply this function to our networks. As we have stored them in a list, this is done in 1 line, instead of 18 lines (3 (for each team) x 3 (for each wave of data) X 2 (for each network variable))
dichoGT4<-function(m){(m>4)+ 0}
alpheusgt4<-lapply(alpheus, dichoGT4)
adulteducgt4<-lapply(adulteduc, dichoGT4)
hhtgt4<-lapply(hht, dichoGT4)
Now we have our variables and we are ready to create siena variables. These are necessary to tell the program RSiena which variables are dependent (sienanet) and which are independent. Independent variables can be dyadic covariates (varDyadCovar) or individual covariates (coCovar). The covariates can be changing or static. In my case they were static, meaning that they did not change between data collection periods. Once this is done, the last step is to put it all together and tell the program which variables belong to which team.
Remember that we loaded our variables for each team as a list. When you have a list, you need to include two square brackets [[ ]] to get to the content of the list. Imagine a list like an excel file with each list item as an excel sheet. The dim variable indicates how many actors are in the network (5) and how many time periods (3).
ae_is <- sienaNet(array(c(adulteducgt4[[2]],adulteducgt4[[4]],adulteducgt4[[6]]), dim=c(4,4,3)), allowOnly=FALSE)
alp_is <-sienaNet(array(c(alpheusgt4[[2]],alpheusgt4[[4]],alpheusgt4[[6]]), dim=c(4,4,3)), allowOnly=FALSE)
hht_is <-sienaNet(array(c(hhtgt4[[2]],hhtgt4[[4]],hhtgt4[[6]]), dim=c(5,5,3)), allowOnly=FALSE)
ae_val <- varDyadCovar(array(c(adulteduc[[1]], adulteduc[[3]]), dim=c(4,4,2)))
alp_val <-varDyadCovar(array(c(alpheus[[1]], alpheus[[3]]), dim=c(4,4,2)))
hht_val <-varDyadCovar(array(c(hht[[1]], hht[[3]]), dim=c(5,5,2)))
ae_ae<-coCovar(ae_att$aev2)
alp_ae<-coCovar(alp_att$aev2)
hht_ae<-coCovar(hht_att$aev2)
Let’s create the groups!
group.1<- sienaDataCreate(IS = ae_is,
val=ae_val,
ae = ae_ae
)
group.2<- sienaDataCreate(IS = alp_is,
val=alp_val,
ae = alp_ae
)
group.3<- sienaDataCreate(IS = hht_is,
val = hht_val,
ae = hht_ae)
We will now begin with running a basic model. This will be our null model and only contains the most basic effects you can think off. To have good convergence, use theory and exploration of your data to consider what network structures could explain your network. Similar to running an ERGM this is a bit of try and error (or an art as I heard other people say). You should have a look at the extensive documentation of network effects. Of course, you can also create your own network effects, interactions between variables.
sienaGroupCreate creates the groups. It just puts them together. The model we are using will have a random intercept for each group, but a fixed slope. getEffects creates an object with the theoretical network structures for our groups. coevalgo The file coeveffect.html provides an overview of all the effects and their naming. It contains more effects that are available to you right now, as it is based on the complete data set.
ir <- sienaGroupCreate(list(group.1, group.2, group.3))
ir_effect <- getEffects(ir)
ir_algo<-sienaAlgorithmCreate(projname = "InfoRetrieval", maxlike=TRUE, mult=6)
#get initial description
print01Report(ir, modelname = 'InfoRetrieval')
The last line in the code above prints a report about your data. It contains some basic statistics (e.g., mean).
We will begin by adding some variables to our model. This is done by adding effects to our effect object ir_effect. We begin by changing reciprocity (recip) from a fixed effect to a random effect.
ir_effect <- setEffect(ir_effect, recip, random=T)
## effectName include fix test initialValue parm
## 1 reciprocity TRUE FALSE FALSE 0 0
The model is based on Bayesian analysis. This is beyond the scope of this workshop. Focusing on but-what-do-I-do-with you can leave the values for fix, test, initialValue, and parm untouched (for now). You can type ?setEffect to get information about the different options.
Then we add the variable valuing by stating its name (interaction1 = “val”) and that we want to know how it impacts the creation, maintenance, or dissolution of ties (type = “eval”). You can also only test the impact of a variable on the creation (creation) and/or maintenance (endow) of ties. X indicates the network for which the effects are included. We do the same for the variable adaptive expertise. Here, we say that this variable impacts the position of the ego, and hence add egoX and not X. Finally, we are checking if all is ok b asking R to print the effects.
ir_effect <- includeEffects(ir_effect, X, interaction1= "val", type="eval")
## effectName include fix test initialValue parm
## 1 val TRUE FALSE FALSE 0 0
ir_effect <- includeEffects(ir_effect,egoX, interaction1= "ae", type="eval")
## effectName include fix test initialValue parm
## 1 ae ego TRUE FALSE FALSE 0 0
print(ir_effect, includeRandoms=T)
## effectName include fix test initialValue parm
## 1 constant IS rate (period 1) TRUE FALSE FALSE 4.36923 0
## 2 constant IS rate (period 2) TRUE FALSE FALSE 0.67692 0
## 3 constant IS rate (period 4) TRUE FALSE FALSE 2.48000 0
## 4 constant IS rate (period 5) TRUE FALSE FALSE 1.90769 0
## 5 constant IS rate (period 7) TRUE FALSE FALSE 3.85714 0
## 6 constant IS rate (period 8) TRUE FALSE FALSE 1.63158 0
## 7 outdegree (density) TRUE FALSE FALSE -0.39226 0
## 8 reciprocity TRUE FALSE FALSE 0.00000 0
## 9 val TRUE FALSE FALSE 0.00000 0
## 10 ae ego TRUE FALSE FALSE 0.00000 0
## randomEffects
## 1 FALSE
## 2 FALSE
## 3 FALSE
## 4 FALSE
## 5 FALSE
## 6 FALSE
## 7 TRUE
## 8 TRUE
## 9 FALSE
## 10 FALSE
## Dimensions of priorMu and priorSigma for sienaBayes should be 2 + 2 = 4 .
The output shows the variables we are including. We assume that density and reciprocity vary between groups. The effect of valuing and adaptive expertise is the same across teams.
Now that the model is specified we can run it. This is done by using sienaBayes. You can change a lot of the parameters for running the algorithms. Higher numbers for nwarm, nmain, nrunMHBatches will give you more accurate results, but will also increase the computation times. So, be careful how you change them. nbrNodes indicates the number of processes to use on your CPU.
The first line fit1 <- sienaBayes(...) contains all the information to run the model. In the following line we are asking R to return the model and then we save it all in a text file called results_of_model.txt. This is done with an opening statement sink(filename) and a closing statement (sink()). We are appending the current results to the file. If you are running several models and want to keep track of the results this might be helpful. Without append =T you will overwrite the file.
The parameters used in this sienaBayes call are not the ones I used in my analysis. All the values are lowered for the workshop. The original values I used were sienaBayes(coevalgo, data=coev, effects=coeveffect, nwarm=100, nmain=50000, nrunMHBatches=20, initgainGroupwise=0, initgainGlobal=0, silentstart=TRUE, nbrNodes=18). Running the model below takes a short time (64.259 seconds). Running the same model using all teams takes a bit longer (1481.995 seconds).
fit1 <- sienaBayes(ir_algo, data=ir, effects=ir_effect, nwarm=10, nmain=25, nrunMHBatches=10)
##
## Estimate initial global parameters
## Initial global estimates
## Estimates, standard errors and convergence t-ratios
##
## Estimate Standard Convergence
## Error t-ratio
## 1. rate constant IS rate (period 1) 93.1228 ( 1.2136 ) -2.6285
## 2. rate constant IS rate (period 2) 0.7178 ( 0.9573 ) 0.0640
## 3. rate constant IS rate (period 4) 50.3232 ( 187.0963 ) -1.2088
## 4. rate constant IS rate (period 5) 10.5093 ( 56.8863 ) -0.0842
## 5. rate constant IS rate (period 7) 18.8642 ( 50.3810 ) -0.2459
## 6. rate constant IS rate (period 8) 1.8090 ( 1.5922 ) 0.0338
## 7. eval outdegree (density) -1.9566 ( 0.7983 ) -1.0219
## 8. eval reciprocity 1.7836 ( 0.9138 ) -0.5054
## 9. eval val 2.4320 ( 1.0780 ) 1.1356
## 10. eval ae ego -0.6070 ( 1.3579 ) 0.1046
##
## Overall maximum convergence ratio: 3.5292
##
##
## Total of 1661 iteration steps.
##
##
##
## maximum initial global estimate is 93.12278
## Group 1
## Estimate initial parameters group 1
##
## Initial estimate obtained
## 100.772 0.768 0.301 0.135 2.432 -0.607
## Group 2
## Estimate initial parameters group 2
##
## Initial estimate obtained
## 58.174 5.090 -2.309 -0.973 2.432 -0.607
## Group 3
## Estimate initial parameters group 3
##
## Initial estimate obtained
## 18.666 1.953 -1.975 1.920 2.432 -0.607
## Condition priorRatesFromData=2 impossible, changed to 1.
## Initial global model estimates
## Estimates, standard errors and convergence t-ratios
##
## Estimate Standard Convergence
## Error t-ratio
## 1. rate constant IS rate (period 1) 93.1228 ( 1.2136 ) -2.6285
## 2. rate constant IS rate (period 2) 0.7178 ( 0.9573 ) 0.0640
## 3. rate constant IS rate (period 4) 50.3232 ( 187.0963 ) -1.2088
## 4. rate constant IS rate (period 5) 10.5093 ( 56.8863 ) -0.0842
## 5. rate constant IS rate (period 7) 18.8642 ( 50.3810 ) -0.2459
## 6. rate constant IS rate (period 8) 1.8090 ( 1.5922 ) 0.0338
## 7. eval outdegree (density) -1.9566 ( 0.7983 ) -1.0219
## 8. eval reciprocity 1.7836 ( 0.9138 ) -0.5054
## 9. eval val 2.4320 ( 1.0780 ) 1.1356
## 10. eval ae ego -0.6070 ( 1.3579 ) 0.1046
##
## Overall maximum convergence ratio: 3.5292
##
##
## Total of 1661 iteration steps.
##
## 6.097
## improveMH
## Desired acceptances 25 .
## ..........
## 1 . 36.7 43.3 11.2 14.6 18.7
## multipliers 2.000 2.000 0.500 0.500 0.854
## scaleFactors 1.667 1.667 0.417 0.417 0.711
## ..........
## 2 . 7.0 27.4 16.9 8.0 9.4
## multipliers 0.500 1.046 0.843 0.500 0.697
## scaleFactors 0.833 1.744 0.351 0.208 0.496
## ..........
## 3 . 6.6 31.2 16.5 12.3 8.6
## multipliers 0.500 1.110 0.851 0.500 0.713
## scaleFactors 0.417 1.935 0.299 0.104 0.353
## ..........
## 4 . 11.4 29.3 20.0 14.5 7.1
## multipliers 0.500 1.070 0.919 0.500 0.707
## scaleFactors 0.208 2.070 0.275 0.052 0.250
## ..........
## 5 . 25.5 28.8 22.3 10.9 17.1
## multipliers 1.008 1.058 0.958 0.500 0.878
## scaleFactors 0.210 2.190 0.263 0.026 0.220
## ..........
## 6 . 24.9 27.8 24.3 16.8 12.7
## multipliers 0.999 1.042 0.990 0.879 0.818
## scaleFactors 0.210 2.281 0.260 0.023 0.180
## ..........
## 7 . 23.6 32.5 24.6 15.9 14.5
## multipliers 0.980 1.107 0.995 0.871 0.851
## scaleFactors 0.206 2.525 0.259 0.020 0.153
## ..........
## 8 . 24.6 28.4 20.2 17.6 19.3
## multipliers 0.994 1.047 0.934 0.899 0.922
## scaleFactors 0.204 2.644 0.242 0.018 0.141
## ..........
## 9 . 22.7 26.6 21.5 13.2 18.9
## multipliers 0.970 1.021 0.953 0.842 0.918
## scaleFactors 0.198 2.699 0.231 0.015 0.129
## ..........
## 10 . 26.6 28.8 22.5 14.9 16.8
## multipliers 1.021 1.049 0.967 0.868 0.894
## scaleFactors 0.202 2.831 0.223 0.013 0.116
## ..........
## 11 . 24.4 30.8 22.1 18.5 23.9
## multipliers 0.993 1.073 0.963 0.918 0.986
## scaleFactors 0.201 3.039 0.215 0.012 0.114
## ..........
## 12 . 23.5 30.1 27.0 20.2 23.4
## multipliers 0.981 1.063 1.024 0.940 0.980
## scaleFactors 0.197 3.232 0.220 0.011 0.112
## ..........
## 13 . 22.2 26.8 26.0 19.3 21.9
## multipliers 0.966 1.021 1.012 0.930 0.962
## scaleFactors 0.190 3.301 0.223 0.011 0.108
## ..........
## 14 . 20.6 23.2 25.2 17.7 17.8
## multipliers 0.947 0.978 1.002 0.913 0.914
## scaleFactors 0.180 3.229 0.223 0.010 0.098
## ..........
## 15 . 21.7 23.9 27.3 19.9 21.8
## multipliers 0.962 0.987 1.027 0.940 0.963
## scaleFactors 0.173 3.187 0.229 0.009 0.095
## ..........
## 16 . 24.9 26.4 25.5 20.8 19.7
## multipliers 0.998 1.016 1.006 0.951 0.939
## scaleFactors 0.173 3.237 0.230 0.009 0.089
## fine tuning took 16 iterations.
## improveMH 31.967 seconds.
## .Warming step 1 ( 10 )
## Accepts 8 / 30
## .Warming step 2 ( 10 )
## Accepts 20 / 30
## .Warming step 3 ( 10 )
## Accepts 9 / 30
## .Warming step 4 ( 10 )
## Accepts 12 / 30
## .Warming step 5 ( 10 )
## Accepts 14 / 30
## .Warming step 6 ( 10 )
## Accepts 12 / 30
## .Warming step 7 ( 10 )
## Accepts 11 / 30
## .Warming step 8 ( 10 )
## Accepts 9 / 30
## .Warming step 9 ( 10 )
## Accepts 11 / 30
## .Warming step 10 ( 10 )
## Accepts 9 / 30
## [1] "end of warming"
## warming took 2.221 seconds.
## Parameter values after warming up
## 1 . 103.170 1.215 0.865 -0.743 2.535 -0.602
## 2 . 6.010 5.750 -1.711 2.105 2.535 -0.602
## 3 . 18.493 2.440 -1.470 1.245 2.535 -0.602
##
## Second improveMH
## Desired acceptances 25 .
## ..........
## 1 . 26.0 8.0 23.3 16.5 24.9
## multipliers 1.022 0.500 0.960 0.803 0.997
## scaleFactors 0.177 1.619 0.221 0.007 0.089
## ..........
## 2 . 24.8 12.8 25.9 23.4 24.2
## multipliers 0.996 0.500 1.018 0.968 0.984
## scaleFactors 0.176 0.809 0.225 0.007 0.087
## ..........
## 3 . 25.5 17.4 24.3 22.2 24.1
## multipliers 1.009 0.867 0.987 0.951 0.983
## scaleFactors 0.178 0.702 0.222 0.006 0.086
## ..........
## 4 . 24.3 20.4 21.4 21.3 24.9
## multipliers 0.988 0.925 0.941 0.939 0.999
## scaleFactors 0.176 0.649 0.209 0.006 0.086
## ..........
## 5 . 25.9 20.0 23.2 21.3 25.1
## multipliers 1.013 0.922 0.972 0.943 1.002
## scaleFactors 0.178 0.598 0.203 0.006 0.086
## ..........
## 6 . 28.7 24.6 23.8 23.2 23.8
## multipliers 1.055 0.994 0.982 0.974 0.982
## scaleFactors 0.188 0.595 0.200 0.005 0.084
## fine tuning took 6 iterations.
## Second improveMH 12.167 seconds.
## .main 11 ( 35 )
## Mu = 81.201 5.756 -1.219 0.778
## Eta = 2.768 -1.488
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1869.2264 2.0198 -21.4987 3.7522
## [2,] 2.0198 47.2620 -9.3547 6.5748
## [3,] -21.4987 -9.3547 3.1967 -1.8047
## [4,] 3.7522 6.5748 -1.8047 1.9659
##
## main 11 ( 35 ) Accepts 14 / 30
## .main 12 ( 35 )
## Mu = -33.215 13.346 -2.963 2.596
## Eta = 2.592 -1.122
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3905.6117 -340.9069 58.0555 -12.6361
## [2,] -340.9069 81.5868 -10.8664 0.1105
## [3,] 58.0555 -10.8664 4.6412 -2.6827
## [4,] -12.6361 0.1105 -2.6827 3.0790
##
## main 12 ( 35 ) Accepts 15 / 30
## .main 13 ( 35 )
## Mu = 58.787 8.268 -0.78 0.775
## Eta = 2.537 -0.815
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4914.7697 28.1615 3.6304 -8.6716
## [2,] 28.1615 11.5070 0.2936 1.0173
## [3,] 3.6304 0.2936 0.9846 -0.5584
## [4,] -8.6716 1.0173 -0.5584 1.6819
##
## main 13 ( 35 ) Accepts 16 / 30
## .main 14 ( 35 )
## Mu = 34.882 12.142 -0.986 0.736
## Eta = 2.41 -0.088
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3405.9031 -310.6468 2.9806 -46.6372
## [2,] -310.6468 44.1493 -1.7558 5.1952
## [3,] 2.9806 -1.7558 1.1129 0.1187
## [4,] -46.6372 5.1952 0.1187 1.3243
##
## main 14 ( 35 ) Accepts 9 / 30
## .main 15 ( 35 )
## Mu = 87.693 9.856 -0.34 -0.054
## Eta = 2.16 -0.196
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5956.1047 -172.4201 18.0112 -48.8451
## [2,] -172.4201 23.6306 -0.6248 2.6485
## [3,] 18.0112 -0.6248 1.2120 -0.2510
## [4,] -48.8451 2.6485 -0.2510 0.8478
##
## main 15 ( 35 ) Accepts 13 / 30
## .main 16 ( 35 )
## Mu = 10.241 8.19 0.483 1.277
## Eta = 2.35 -0.194
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2628.703 -143.449 19.350 -39.676
## [2,] -143.449 29.122 -4.579 4.155
## [3,] 19.350 -4.579 2.952 -0.263
## [4,] -39.676 4.155 -0.263 2.194
##
## main 16 ( 35 ) Accepts 10 / 30
## .main 17 ( 35 )
## Mu = 40.082 10.984 -0.404 0.487
## Eta = 2.178 0.086
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2687.377 -132.389 46.254 -31.556
## [2,] -132.389 27.661 -1.860 2.162
## [3,] 46.254 -1.860 2.999 -0.823
## [4,] -31.556 2.162 -0.823 0.921
##
## main 17 ( 35 ) Accepts 19 / 30
## .main 18 ( 35 )
## Mu = 45.254 6.252 0.87 0.096
## Eta = 2.4 0.107
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3300.920 -22.112 31.726 -46.111
## [2,] -22.112 21.025 -0.590 2.059
## [3,] 31.726 -0.590 1.825 -0.959
## [4,] -46.111 2.059 -0.959 1.371
##
## main 18 ( 35 ) Accepts 6 / 30
## .main 19 ( 35 )
## Mu = 37.535 10.67 -0.068 0.384
## Eta = 2.313 0.367
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2762.042 129.232 11.771 52.015
## [2,] 129.232 91.863 -0.785 9.468
## [3,] 11.771 -0.785 0.828 0.036
## [4,] 52.015 9.468 0.036 2.949
##
## main 19 ( 35 ) Accepts 11 / 30
## .main 20 ( 35 )
## Mu = 52.424 11.413 -0.714 1.125
## Eta = 2.423 -0.084
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2766.044 -85.631 39.458 -29.080
## [2,] -85.631 28.639 -3.896 4.707
## [3,] 39.458 -3.896 2.588 -1.538
## [4,] -29.080 4.707 -1.538 1.565
##
## main 20 ( 35 ) Accepts 8 / 30
## .main 21 ( 35 )
## Mu = 3.291 8.449 -0.727 1.001
## Eta = 2.511 0.374
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1692.536 -31.797 31.636 -21.958
## [2,] -31.797 16.573 1.997 1.300
## [3,] 31.636 1.997 2.650 -0.949
## [4,] -21.958 1.300 -0.949 1.604
##
## main 21 ( 35 ) Accepts 15 / 30
## .main 22 ( 35 )
## Mu = 32.987 7.774 -0.591 0.623
## Eta = 2.044 0.587
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2508.468 45.984 49.969 9.243
## [2,] 45.984 154.522 -9.660 10.368
## [3,] 49.969 -9.660 3.319 -0.369
## [4,] 9.243 10.368 -0.369 1.697
##
## main 22 ( 35 ) Accepts 16 / 30
## .main 23 ( 35 )
## Mu = -8.756 8.382 -1.467 -0.842
## Eta = 2.214 -0.133
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3644.732 -146.185 16.416 16.907
## [2,] -146.185 26.893 -4.773 3.757
## [3,] 16.416 -4.773 3.460 -1.282
## [4,] 16.907 3.757 -1.282 2.295
##
## main 23 ( 35 ) Accepts 14 / 30
## .main 24 ( 35 )
## Mu = 29.687 9.352 -0.551 0.634
## Eta = 2.194 0.058
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 7007.435 -311.767 42.138 -46.920
## [2,] -311.767 30.126 -1.904 4.558
## [3,] 42.138 -1.904 1.229 0.194
## [4,] -46.920 4.558 0.194 1.476
##
## main 24 ( 35 ) Accepts 13 / 30
## .main 25 ( 35 )
## Mu = 59.854 8.98 -0.309 1.105
## Eta = 1.98 0.346
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1444.813 -31.792 13.343 2.888
## [2,] -31.792 17.134 -2.865 0.583
## [3,] 13.343 -2.865 2.251 -0.199
## [4,] 2.888 0.583 -0.199 1.061
##
## main 25 ( 35 ) Accepts 8 / 30
## .main 26 ( 35 )
## Mu = 71.453 5.812 -0.463 -1.582
## Eta = 2.171 0.606
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1700.553 -149.779 17.981 -15.509
## [2,] -149.779 30.562 -3.077 2.388
## [3,] 17.981 -3.077 1.355 0.901
## [4,] -15.509 2.388 0.901 3.102
##
## main 26 ( 35 ) Accepts 8 / 30
## .main 27 ( 35 )
## Mu = 109.491 6.985 -0.817 -1.277
## Eta = 2.108 0.561
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3376.192 -125.284 4.013 -78.795
## [2,] -125.284 36.217 -3.513 4.231
## [3,] 4.013 -3.513 1.432 -0.030
## [4,] -78.795 4.231 -0.030 3.353
##
## main 27 ( 35 ) Accepts 17 / 30
## .main 28 ( 35 )
## Mu = 42.848 6.051 0.407 0.657
## Eta = 2.122 0.528
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1811.955 -64.213 30.304 0.232
## [2,] -64.213 23.769 -1.366 2.378
## [3,] 30.304 -1.366 2.327 1.307
## [4,] 0.232 2.378 1.307 2.217
##
## main 28 ( 35 ) Accepts 11 / 30
## .main 29 ( 35 )
## Mu = 30.561 8.487 -1.518 1.277
## Eta = 2.225 0.772
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5776.992 -49.048 5.684 3.893
## [2,] -49.048 21.078 -3.684 5.545
## [3,] 5.684 -3.684 1.455 -0.179
## [4,] 3.893 5.545 -0.179 4.964
##
## main 29 ( 35 ) Accepts 5 / 30
## .main 30 ( 35 )
## Mu = 17.953 10.24 -0.04 0.731
## Eta = 2.254 0.585
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5384.783 -243.235 12.103 -41.626
## [2,] -243.235 28.776 -0.610 2.743
## [3,] 12.103 -0.610 1.129 0.147
## [4,] -41.626 2.743 0.147 1.198
##
## main 30 ( 35 ) Accepts 15 / 30
##
## Mu = 17.953 10.24 -0.04 0.731
## Eta = 2.254 0.585
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5384.783 -243.235 12.103 -41.626
## [2,] -243.235 28.776 -0.610 2.743
## [3,] 12.103 -0.610 1.129 0.147
## [4,] -41.626 2.743 0.147 1.198
##
## .main 31 ( 35 )
## Mu = 90.334 -0.951 -2.189 -0.805
## Eta = 2.165 0.659
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1384.511 -132.298 -13.256 -7.712
## [2,] -132.298 36.870 5.514 5.309
## [3,] -13.256 5.514 1.793 0.744
## [4,] -7.712 5.309 0.744 1.807
##
## main 31 ( 35 ) Accepts 6 / 30
## .main 32 ( 35 )
## Mu = -23.928 11.301 -2.327 0.038
## Eta = 2.165 0.751
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4202.259 -225.450 49.362 14.915
## [2,] -225.450 44.071 -7.786 -0.324
## [3,] 49.362 -7.786 2.243 -0.196
## [4,] 14.915 -0.324 -0.196 0.937
##
## main 32 ( 35 ) Accepts 12 / 30
## .main 33 ( 35 )
## Mu = 17.013 5.95 -0.664 0.135
## Eta = 2.329 0.243
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3801.569 -230.105 107.876 -15.790
## [2,] -230.105 82.728 -15.980 16.008
## [3,] 107.876 -15.980 6.964 -1.518
## [4,] -15.790 16.008 -1.518 4.265
##
## main 33 ( 35 ) Accepts 12 / 30
## .main 34 ( 35 )
## Mu = 22.213 3.405 0.039 0.464
## Eta = 2.004 0.492
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1669.458 -9.811 -3.937 -12.784
## [2,] -9.811 39.558 -1.896 4.535
## [3,] -3.937 -1.896 1.365 -0.362
## [4,] -12.784 4.535 -0.362 1.178
##
## main 34 ( 35 ) Accepts 11 / 30
## .main 35 ( 35 )
## Mu = 32.794 8.961 -0.123 0.816
## Eta = 2.118 0.027
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1514.405 2.271 12.245 -4.115
## [2,] 2.271 37.364 4.130 6.461
## [3,] 12.245 4.130 1.472 0.589
## [4,] -4.115 6.461 0.589 1.623
##
## main 35 ( 35 ) Accepts 15 / 30
## Total duration 58.599 seconds.
Of course, we want to see the results of the model. To do this, we have to modify the print.sienaBayes function as NA’s have crept into the output. In the function print.sienaBayes the parameters are rounded, which doesn’t work if a vector has numbers and NA. This is not recognized as a numeric vector but as a character vector, which the round function doesn’t accept. We will load the functions below, which will override the print function we loaded with the package. An alternative is to rename the function.
source("sienaprint_modified.R", echo=F)
fit1
## Note: this summary does not contain a convergence check.
##
## Groups:
## Data1 Data2 Data3
##
## Posterior means and standard deviations for global mean parameters
##
## Total number of runs in the results is 35 .
## Posterior means and standard deviations are averages over 25 MCMC runs (counted after thinning).
##
## Post. Post. cred. cred. p varying Post. cred. cred.
## mean s.d.m. from to s.d. from to
## 1. rate constant IS rate (period 1) 103.0817 ( 0.4500 ) NA NA NA
## 2. rate constant IS rate (period 2) 0.4749 ( 0.3089 ) NA NA NA
## 3. rate constant IS rate (period 4) 9.1526 ( 1.1457 ) NA NA NA
## 4. rate constant IS rate (period 5) 4.3652 ( 0.8597 ) NA NA NA
## 5. rate constant IS rate (period 7) 19.0851 ( 0.3805 ) NA NA NA
## 6. rate constant IS rate (period 8) 3.8882 ( 0.4840 ) NA NA NA
## 7. eval outdegree (density) -0.6985 ( 0.8870 ) -2.5816 0.6379 0.16 + 1.5071 0.9601 2.3601
## 8. eval reciprocity 0.4469 ( 0.8848 ) -1.3993 1.8048 0.80 + 1.4237 0.9442 2.1318
## 9. eval val 2.2694 ( 0.1930 ) 1.9940 2.6623 1.00 - NA NA NA
## 10. eval ae ego 0.1211 ( 0.5715 ) -1.2686 0.7593 0.68 - NA NA NA
##
## Posterior mean of global covariance matrix (varying parameters)
## 3244.6945 -110.0260 23.4247 -16.1832
## -110.0260 41.3075 -3.1796 4.3175
## 23.4247 -3.1796 2.2713 -0.3971
## -16.1832 4.3175 -0.3971 2.0270
##
## Posterior standard deviations of elements of global covariance matrix
## 1578.0979 120.9573 26.8092 27.7503
## 120.9573 31.2598 4.7150 3.5884
## 26.8092 4.7150 1.3684 0.9046
## 27.7503 3.5884 0.9046 1.0576
sink("results_of_model.txt", append=T)
fit1
## Note: this summary does not contain a convergence check.
##
## Groups:
## Data1 Data2 Data3
##
## Posterior means and standard deviations for global mean parameters
##
## Total number of runs in the results is 35 .
## Posterior means and standard deviations are averages over 25 MCMC runs (counted after thinning).
##
## Post. Post. cred. cred. p varying Post. cred. cred.
## mean s.d.m. from to s.d. from to
## 1. rate constant IS rate (period 1) 103.0817 ( 0.4500 ) NA NA NA
## 2. rate constant IS rate (period 2) 0.4749 ( 0.3089 ) NA NA NA
## 3. rate constant IS rate (period 4) 9.1526 ( 1.1457 ) NA NA NA
## 4. rate constant IS rate (period 5) 4.3652 ( 0.8597 ) NA NA NA
## 5. rate constant IS rate (period 7) 19.0851 ( 0.3805 ) NA NA NA
## 6. rate constant IS rate (period 8) 3.8882 ( 0.4840 ) NA NA NA
## 7. eval outdegree (density) -0.6985 ( 0.8870 ) -2.5816 0.6379 0.16 + 1.5071 0.9601 2.3601
## 8. eval reciprocity 0.4469 ( 0.8848 ) -1.3993 1.8048 0.80 + 1.4237 0.9442 2.1318
## 9. eval val 2.2694 ( 0.1930 ) 1.9940 2.6623 1.00 - NA NA NA
## 10. eval ae ego 0.1211 ( 0.5715 ) -1.2686 0.7593 0.68 - NA NA NA
##
## Posterior mean of global covariance matrix (varying parameters)
## 3244.6945 -110.0260 23.4247 -16.1832
## -110.0260 41.3075 -3.1796 4.3175
## 23.4247 -3.1796 2.2713 -0.3971
## -16.1832 4.3175 -0.3971 2.0270
##
## Posterior standard deviations of elements of global covariance matrix
## 1578.0979 120.9573 26.8092 27.7503
## 120.9573 31.2598 4.7150 3.5884
## 26.8092 4.7150 1.3684 0.9046
## 27.7503 3.5884 0.9046 1.0576
sink()
After you run a model, you should check convergence. The lines below will create a couple of plots. We are looking for any types of irregularities, upward, or downward trends. To run the convergence check we first need to load another R file with the necessary scripts. I did not want to see the output of running the file and hence I have added echo=F (You can write out TRUE or FALSE or add the shorthand T and F).
source("BayesPlots.R", echo=F)
The following two lines of code will test convergence for every variable and for every team. If you want you can change folders before and after to save the files in a specific place or modify the function RateTracePlots and NonRateTracePlots to include an option for a file path.
RateTracePlots(fit1)
NonRateTracePlots(fit1)
In your working directory you should now see 10 pictures (png files). Instructions about what these are in the BayesPlots.R file we loaded.
We are going to look at fit1_NRTP_1.png. First a bit of background. What did you do so far ? You run a number of Markov Chain Monte Carlo (MCMC) simulations using Bayesian regression. The goal of this is to find the values for your variables. The provided link provides an excellent explanation of how this is done. In this example, you ran 35 simulations (nwarm = 10 and nmain = 25). At the end of every simulation, your variables were given certain values. These values you see as dots on your graph. Convergence happens when the values are similar in each run of the simulation. With our current analysis, it is not possible to make any claims about that. Theta is to Bayesian calculation what beta is to classical frequentist calculations.
As with any other model, you can now decide to add or remove effects until you answered all your questions. For example, we can test for balance (transTrip). We’ll add the effects to our effect object ir_effect, and run the model using sienaBayes. We are using a new fit name fit2 so that we look again at the results we want, extract numbers from fit1. If you are running into memory problems, then you might want to overwrite the model. You could first save fit1 as an Rdata file (save(object, file = filepath)). We did a couple of changes to the sienaBayes call. We increased the length of the Markov Chain, by increasing nwarm and nmain, and asked for a silentstart to reduce the output we get in the console. Running this model takes 58 seconds.
ir_effect<-includeEffects(ir_effect, transTrip)
## effectName include fix test initialValue parm
## 1 transitive triplets TRUE FALSE FALSE 0 0
fit2 <- sienaBayes(ir_algo, data=ir, effects=ir_effect, nwarm=20, nmain=70, nrunMHBatches=10, silentstart=T)
##
## Estimate initial global parameters
## Initial global estimates
## Estimates, standard errors and convergence t-ratios
##
## Estimate Standard Convergence
## Error t-ratio
## 1. rate constant IS rate (period 1) 121.5396 ( 100.5593 ) -2.6279
## 2. rate constant IS rate (period 2) 0.3460 ( 0.4058 ) -0.1049
## 3. rate constant IS rate (period 4) 30.6200 ( 100.2487 ) -0.6260
## 4. rate constant IS rate (period 5) 3.4503 ( 4.5326 ) -0.0310
## 5. rate constant IS rate (period 7) 9.5720 ( 21.5764 ) -0.0489
## 6. rate constant IS rate (period 8) 1.2789 ( 1.0380 ) -0.0107
## 7. eval outdegree (density) -1.1999 ( 0.3892 ) -0.9314
## 8. eval reciprocity 0.4560 ( 0.7648 ) -1.1567
## 9. eval transitive triplets 0.4949 ( 0.5387 ) -0.4367
## 10. eval val 0.4442 ( 0.2952 ) -2.0362
## 11. eval ae ego 0.3134 ( 0.5312 ) 0.3165
##
## Overall maximum convergence ratio: 3.4265
##
##
## Total of 1592 iteration steps.
##
##
##
## maximum initial global estimate is 121.5396
## Group 1
## Estimate initial parameters group 1
##
## Initial estimate obtained
## 125.823 0.410 -0.971 0.270 0.495 0.444 0.313
## Group 2
## Estimate initial parameters group 2
##
## Initial estimate obtained
## 33.219 5.288 -3.014 4.603 0.495 0.444 0.313
## Group 3
## Estimate initial parameters group 3
##
## Initial estimate obtained
## 9.400 1.313 -1.360 0.890 0.495 0.444 0.313
## Condition priorRatesFromData=2 impossible, changed to 1.
## Initial global model estimates
## Estimates, standard errors and convergence t-ratios
##
## Estimate Standard Convergence
## Error t-ratio
## 1. rate constant IS rate (period 1) 121.5396 ( 100.5593 ) -2.6279
## 2. rate constant IS rate (period 2) 0.3460 ( 0.4058 ) -0.1049
## 3. rate constant IS rate (period 4) 30.6200 ( 100.2487 ) -0.6260
## 4. rate constant IS rate (period 5) 3.4503 ( 4.5326 ) -0.0310
## 5. rate constant IS rate (period 7) 9.5720 ( 21.5764 ) -0.0489
## 6. rate constant IS rate (period 8) 1.2789 ( 1.0380 ) -0.0107
## 7. eval outdegree (density) -1.1999 ( 0.3892 ) -0.9314
## 8. eval reciprocity 0.4560 ( 0.7648 ) -1.1567
## 9. eval transitive triplets 0.4949 ( 0.5387 ) -0.4367
## 10. eval val 0.4442 ( 0.2952 ) -2.0362
## 11. eval ae ego 0.3134 ( 0.5312 ) 0.3165
##
## Overall maximum convergence ratio: 3.4265
##
##
## Total of 1592 iteration steps.
##
## 6.844
## improveMH
## Desired acceptances 25 .
## ..........
## 1 . 11.9 41.3 12.5 10.9 4.1
## multipliers 0.500 2.000 0.500 0.500 0.200
## scaleFactors 0.357 1.429 0.357 0.357 0.143
## ..........
## 2 . 25.4 37.3 20.2 12.5 12.9
## multipliers 1.009 2.000 0.907 0.500 0.500
## scaleFactors 0.360 2.857 0.324 0.179 0.071
## ..........
## 3 . 22.7 25.8 20.8 23.3 20.7
## multipliers 0.959 1.013 0.926 0.969 0.924
## scaleFactors 0.346 2.895 0.300 0.173 0.066
## ..........
## 4 . 24.9 22.0 23.0 23.3 20.4
## multipliers 0.999 0.952 0.967 0.973 0.925
## scaleFactors 0.345 2.755 0.290 0.168 0.061
## fine tuning took 4 iterations.
## improveMH 9.187 seconds.
## .Warming step 1 ( 20 )
## Accepts 12 / 30
## .Warming step 2 ( 20 )
## Accepts 13 / 30
## .Warming step 3 ( 20 )
## Accepts 14 / 30
## .Warming step 4 ( 20 )
## Accepts 18 / 30
## .Warming step 5 ( 20 )
## Accepts 15 / 30
## .Warming step 6 ( 20 )
## Accepts 9 / 30
## .Warming step 7 ( 20 )
## Accepts 18 / 30
## .Warming step 8 ( 20 )
## Accepts 9 / 30
## .Warming step 9 ( 20 )
## Accepts 10 / 30
## .Warming step 10 ( 20 )
## Accepts 8 / 30
## .Warming step 11 ( 20 )
## Accepts 13 / 30
## .Warming step 12 ( 20 )
## Accepts 8 / 30
## .Warming step 13 ( 20 )
## Accepts 16 / 30
## .Warming step 14 ( 20 )
## Accepts 13 / 30
## .Warming step 15 ( 20 )
## Accepts 14 / 30
## .Warming step 16 ( 20 )
## Accepts 14 / 30
## .Warming step 17 ( 20 )
## Accepts 5 / 30
## .Warming step 18 ( 20 )
## Accepts 13 / 30
## .Warming step 19 ( 20 )
## Accepts 12 / 30
## .Warming step 20 ( 20 )
## Accepts 17 / 30
## [1] "end of warming"
## warming took 4.836 seconds.
## Parameter values after warming up
## 1 . 123.696 0.831 -1.344 0.292 0.847 0.251 0.262
## 2 . 4.445 6.035 -1.730 1.710 0.847 0.251 0.262
## 3 . 7.204 1.136 -1.257 0.466 0.847 0.251 0.262
##
## Second improveMH
## Desired acceptances 25 .
## ..........
## 1 . 26.4 9.6 28.0 24.1 24.7
## multipliers 1.033 0.500 1.070 0.978 0.994
## scaleFactors 0.357 1.378 0.311 0.165 0.061
## ..........
## 2 . 25.2 19.4 31.5 26.1 25.7
## multipliers 1.005 0.891 1.125 1.022 1.013
## scaleFactors 0.358 1.227 0.349 0.168 0.061
## ..........
## 3 . 22.9 19.0 28.3 27.2 28.2
## multipliers 0.962 0.894 1.057 1.038 1.056
## scaleFactors 0.345 1.097 0.369 0.175 0.065
## ..........
## 4 . 26.2 23.9 25.9 27.3 27.4
## multipliers 1.019 0.982 1.015 1.037 1.040
## scaleFactors 0.351 1.078 0.375 0.181 0.068
## ..........
## 5 . 24.7 23.5 23.9 27.4 27.5
## multipliers 0.996 0.977 0.984 1.037 1.038
## scaleFactors 0.350 1.053 0.369 0.188 0.070
## fine tuning took 5 iterations.
## Second improveMH 11.023 seconds.
## .main 21 ( 90 )
## Mu = 191.684 8.19 -2.34 1.421
## Eta = 1.076 0.325 0.048
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 112398.0783 -519.7388 -707.3291 700.8130
## [2,] -519.7388 55.7908 1.9196 -0.2633
## [3,] -707.3291 1.9196 5.6780 -4.9976
## [4,] 700.8130 -0.2633 -4.9976 5.3673
##
## main 21 ( 90 ) Accepts 11 / 30
## .main 22 ( 90 )
## Mu = 22.396 4.11 -1.934 -1.154
## Eta = 1.062 0.216 0.215
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3063.8510 0.8275 13.6168 -9.2695
## [2,] 0.8275 29.4144 2.3285 5.7718
## [3,] 13.6168 2.3285 1.3203 0.6299
## [4,] -9.2695 5.7718 0.6299 9.4853
##
## main 22 ( 90 ) Accepts 14 / 30
## .main 23 ( 90 )
## Mu = -25.753 8.056 -0.553 3.871
## Eta = 1.168 0.384 -0.28
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 9982.8995 -497.7515 -98.1168 -170.2374
## [2,] -497.7515 39.7809 3.7850 13.7347
## [3,] -98.1168 3.7850 2.2998 1.3679
## [4,] -170.2374 13.7347 1.3679 6.4842
##
## main 23 ( 90 ) Accepts 12 / 30
## .main 24 ( 90 )
## Mu = 11.748 6.848 -3.128 2.498
## Eta = 1.109 0.387 -0.459
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 17138.0523 94.1560 42.9265 -156.6532
## [2,] 94.1560 42.7271 -8.6761 11.2318
## [3,] 42.9265 -8.6761 3.0987 -3.7309
## [4,] -156.6532 11.2318 -3.7309 6.4016
##
## main 24 ( 90 ) Accepts 17 / 30
## .main 25 ( 90 )
## Mu = 52.508 5.001 -0.922 0.922
## Eta = 0.909 0.493 -0.455
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5265.3538 -64.0563 -34.5872 -38.3650
## [2,] -64.0563 5.4512 -0.5077 1.7805
## [3,] -34.5872 -0.5077 1.7849 0.3062
## [4,] -38.3650 1.7805 0.3062 2.4487
##
## main 25 ( 90 ) Accepts 13 / 30
## .main 26 ( 90 )
## Mu = 48.307 7.129 -0.62 0.032
## Eta = 0.916 0.468 -0.243
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 6130.9371 -84.6798 -7.2594 -1.0436
## [2,] -84.6798 7.4357 -0.5413 0.5402
## [3,] -7.2594 -0.5413 1.8164 -0.5637
## [4,] -1.0436 0.5402 -0.5637 0.8489
##
## main 26 ( 90 ) Accepts 17 / 30
## .main 27 ( 90 )
## Mu = 12.248 6.058 -1.752 0.741
## Eta = 0.928 0.361 0.032
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4024.2271 -112.7099 19.4514 49.5385
## [2,] -112.7099 9.4864 -1.2572 -2.0175
## [3,] 19.4514 -1.2572 0.9329 -0.1392
## [4,] 49.5385 -2.0175 -0.1392 2.3781
##
## main 27 ( 90 ) Accepts 17 / 30
## .main 28 ( 90 )
## Mu = 22.248 4.78 -1.573 1.644
## Eta = 0.698 0.464 0.119
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 6241.2751 40.2019 -2.6985 -30.4608
## [2,] 40.2019 8.3805 0.0673 -0.9027
## [3,] -2.6985 0.0673 2.0516 -1.0628
## [4,] -30.4608 -0.9027 -1.0628 1.6643
##
## main 28 ( 90 ) Accepts 16 / 30
## .main 29 ( 90 )
## Mu = -67.846 6.363 -2.31 -0.074
## Eta = 0.846 0.486 -0.163
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 58916.7700 -912.9983 386.8023 744.5425
## [2,] -912.9983 26.9352 -7.1223 -10.7508
## [3,] 386.8023 -7.1223 5.2924 7.0989
## [4,] 744.5425 -10.7508 7.0989 12.5689
##
## main 29 ( 90 ) Accepts 13 / 30
## .main 30 ( 90 )
## Mu = 57.271 0.925 -0.725 1.626
## Eta = 0.725 0.471 -0.208
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 8954.8307 -384.6424 42.5192 34.0726
## [2,] -384.6424 32.4548 -3.4475 -4.4323
## [3,] 42.5192 -3.4475 1.2685 0.1933
## [4,] 34.0726 -4.4323 0.1933 1.5753
##
## main 30 ( 90 ) Accepts 14 / 30
## .main 31 ( 90 )
## Mu = 61.13 5.868 -1.192 0.88
## Eta = 0.784 0.639 -0.45
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5821.9751 -85.7539 13.1141 -7.0453
## [2,] -85.7539 21.3578 -0.6185 -0.2995
## [3,] 13.1141 -0.6185 1.5225 -0.1912
## [4,] -7.0453 -0.2995 -0.1912 0.4750
##
## main 31 ( 90 ) Accepts 12 / 30
## .main 32 ( 90 )
## Mu = 57.642 5.156 -1.954 0.681
## Eta = 0.964 0.622 -0.597
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 10196.4225 -173.8850 -51.1232 -11.8239
## [2,] -173.8850 12.7424 -0.4948 -1.3243
## [3,] -51.1232 -0.4948 1.8339 -0.4470
## [4,] -11.8239 -1.3243 -0.4470 1.2361
##
## main 32 ( 90 ) Accepts 15 / 30
## .main 33 ( 90 )
## Mu = 95.705 2.189 -0.941 0.001
## Eta = 1.004 0.631 -0.498
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 9138.9919 -174.8807 -5.1506 50.9015
## [2,] -174.8807 12.4824 -0.3614 0.5833
## [3,] -5.1506 -0.3614 0.6613 -0.3132
## [4,] 50.9015 0.5833 -0.3132 2.6970
##
## main 33 ( 90 ) Accepts 16 / 30
## .main 34 ( 90 )
## Mu = 11.428 5.616 -1.775 1.327
## Eta = 0.969 0.665 -0.691
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3822.9016 -42.5075 -39.0950 28.3962
## [2,] -42.5075 6.3606 -0.4592 1.1714
## [3,] -39.0950 -0.4592 2.1220 -1.3254
## [4,] 28.3962 1.1714 -1.3254 1.9206
##
## main 34 ( 90 ) Accepts 13 / 30
## .main 35 ( 90 )
## Mu = 55.026 0.587 -2.472 0.441
## Eta = 0.819 0.615 -0.597
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 7385.107 -262.502 -48.203 -51.689
## [2,] -262.502 18.879 2.767 3.619
## [3,] -48.203 2.767 2.820 0.277
## [4,] -51.689 3.619 0.277 1.321
##
## main 35 ( 90 ) Accepts 14 / 30
## .main 36 ( 90 )
## Mu = 83.09 5.464 -0.552 1.149
## Eta = 0.867 0.66 -0.399
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2679.126 -14.843 -23.618 14.093
## [2,] -14.843 25.743 -5.623 1.141
## [3,] -23.618 -5.623 2.613 -0.346
## [4,] 14.093 1.141 -0.346 0.886
##
## main 36 ( 90 ) Accepts 10 / 30
## .main 37 ( 90 )
## Mu = 56.648 5.498 -3.383 2.497
## Eta = 0.68 0.696 -0.166
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4687.875 23.229 -169.043 117.895
## [2,] 23.229 9.166 -3.839 2.611
## [3,] -169.043 -3.839 10.204 -6.404
## [4,] 117.895 2.611 -6.404 4.985
##
## main 37 ( 90 ) Accepts 21 / 30
## .main 38 ( 90 )
## Mu = 125.256 3.004 -1.469 1.194
## Eta = 0.71 0.662 -0.721
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5153.781 -107.179 -2.989 -42.890
## [2,] -107.179 6.477 -0.646 1.552
## [3,] -2.989 -0.646 0.752 0.326
## [4,] -42.890 1.552 0.326 4.051
##
## main 38 ( 90 ) Accepts 16 / 30
## .main 39 ( 90 )
## Mu = -24.282 8.555 -1.013 2.214
## Eta = 0.563 0.583 -0.904
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 11620.564 -330.099 -36.247 -155.277
## [2,] -330.099 33.400 2.969 4.916
## [3,] -36.247 2.969 1.251 0.210
## [4,] -155.277 4.916 0.210 2.822
##
## main 39 ( 90 ) Accepts 14 / 30
## .main 40 ( 90 )
## Mu = 12.508 7.492 -0.433 1.182
## Eta = 0.714 0.749 -0.669
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 26677.950 -1384.737 -79.475 -196.831
## [2,] -1384.737 82.990 4.016 12.776
## [3,] -79.475 4.016 1.345 0.191
## [4,] -196.831 12.776 0.191 2.985
##
## main 40 ( 90 ) Accepts 6 / 30
## .main 41 ( 90 )
## Mu = 78.406 3.627 -1.406 1.155
## Eta = 0.478 0.852 -0.623
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5573.828 -202.232 42.638 -29.854
## [2,] -202.232 13.280 -1.721 0.445
## [3,] 42.638 -1.721 1.275 -0.191
## [4,] -29.854 0.445 -0.191 0.923
##
## main 41 ( 90 ) Accepts 17 / 30
## .main 42 ( 90 )
## Mu = 17.155 5.295 -1.191 2.281
## Eta = 0.806 0.739 -0.543
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3339.754 -34.143 -14.067 -47.851
## [2,] -34.143 8.022 -0.035 2.872
## [3,] -14.067 -0.035 1.168 0.120
## [4,] -47.851 2.872 0.120 2.427
##
## main 42 ( 90 ) Accepts 15 / 30
## .main 43 ( 90 )
## Mu = 28.076 11.402 -2.214 1.69
## Eta = 0.605 0.814 -0.444
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2750.724 -54.497 -7.969 -26.362
## [2,] -54.497 12.670 -2.447 1.013
## [3,] -7.969 -2.447 1.786 -0.548
## [4,] -26.362 1.013 -0.548 1.335
##
## main 43 ( 90 ) Accepts 18 / 30
## .main 44 ( 90 )
## Mu = 74.036 2.817 -1.215 0.548
## Eta = 0.643 0.655 -0.702
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3610.134 -69.161 -48.118 2.600
## [2,] -69.161 10.645 -0.467 2.137
## [3,] -48.118 -0.467 2.013 -0.669
## [4,] 2.600 2.137 -0.669 1.007
##
## main 44 ( 90 ) Accepts 9 / 30
## .main 45 ( 90 )
## Mu = 34.553 6.465 -0.385 1.169
## Eta = 0.53 0.862 -0.35
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 8161.429 -112.000 44.467 -23.188
## [2,] -112.000 7.764 -2.322 1.235
## [3,] 44.467 -2.322 1.788 -0.716
## [4,] -23.188 1.235 -0.716 1.006
##
## main 45 ( 90 ) Accepts 13 / 30
## .main 46 ( 90 )
## Mu = 115.025 4.284 -2.23 -0.747
## Eta = 0.399 0.909 -0.405
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 13479.047 -406.011 -48.631 -5.018
## [2,] -406.011 22.669 1.063 1.945
## [3,] -48.631 1.063 1.265 0.767
## [4,] -5.018 1.945 0.767 1.909
##
## main 46 ( 90 ) Accepts 14 / 30
## .main 47 ( 90 )
## Mu = 37.685 7.236 -2.016 1.183
## Eta = 0.419 0.736 -0.106
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5296.960 -167.310 13.862 -55.531
## [2,] -167.310 11.076 -1.358 1.730
## [3,] 13.862 -1.358 0.706 -0.218
## [4,] -55.531 1.730 -0.218 2.418
##
## main 47 ( 90 ) Accepts 17 / 30
## .main 48 ( 90 )
## Mu = 10.646 4.457 -1.961 2.043
## Eta = 0.46 1.015 -0.64
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 9495.108 -222.855 29.664 -94.080
## [2,] -222.855 14.618 -4.272 3.506
## [3,] 29.664 -4.272 3.072 -1.197
## [4,] -94.080 3.506 -1.197 1.989
##
## main 48 ( 90 ) Accepts 15 / 30
## .main 49 ( 90 )
## Mu = 70.284 2.567 -1.026 0.717
## Eta = 0.749 1.007 -0.502
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3987.520 -31.730 28.415 -0.711
## [2,] -31.730 3.508 -0.167 0.214
## [3,] 28.415 -0.167 1.071 -0.394
## [4,] -0.711 0.214 -0.394 0.630
##
## main 49 ( 90 ) Accepts 18 / 30
## .main 50 ( 90 )
## Mu = 53.068 6.62 -1.217 1.282
## Eta = 0.705 0.893 -0.43
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 37422.042 -735.229 -83.517 -243.397
## [2,] -735.229 27.498 0.687 7.017
## [3,] -83.517 0.687 1.882 0.721
## [4,] -243.397 7.017 0.721 2.497
##
## main 50 ( 90 ) Accepts 11 / 30
## .main 51 ( 90 )
## Mu = 4.984 4.468 -1.368 -0.146
## Eta = 0.408 0.928 -0.383
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4161.336 -40.919 -18.621 14.274
## [2,] -40.919 4.311 0.243 -0.269
## [3,] -18.621 0.243 0.914 0.278
## [4,] 14.274 -0.269 0.278 1.608
##
## main 51 ( 90 ) Accepts 12 / 30
## .main 52 ( 90 )
## Mu = 125.164 5.358 -2.192 1.464
## Eta = 0.482 0.922 -0.117
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4117.982 19.884 -2.406 30.380
## [2,] 19.884 6.723 -0.049 0.479
## [3,] -2.406 -0.049 1.417 -0.269
## [4,] 30.380 0.479 -0.269 1.277
##
## main 52 ( 90 ) Accepts 14 / 30
## .main 53 ( 90 )
## Mu = 12.52 5.465 -1.675 0.379
## Eta = 0.444 1.045 -0.203
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 6178.092 -86.605 12.948 1.158
## [2,] -86.605 4.357 -0.133 0.470
## [3,] 12.948 -0.133 0.699 0.129
## [4,] 1.158 0.470 0.129 0.565
##
## main 53 ( 90 ) Accepts 11 / 30
## .main 54 ( 90 )
## Mu = 65.774 3.009 -1.116 0.262
## Eta = 0.521 1.15 -0.251
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2219.481 -38.936 0.573 -12.468
## [2,] -38.936 5.367 -0.350 0.675
## [3,] 0.573 -0.350 0.656 -0.364
## [4,] -12.468 0.675 -0.364 0.835
##
## main 54 ( 90 ) Accepts 17 / 30
## .main 55 ( 90 )
## Mu = 40.386 6.986 -1.371 1.318
## Eta = 0.524 0.972 -0.041
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3134.297 -29.440 11.216 55.271
## [2,] -29.440 5.280 -0.997 0.449
## [3,] 11.216 -0.997 2.093 0.552
## [4,] 55.271 0.449 0.552 2.521
##
## main 55 ( 90 ) Accepts 12 / 30
## .main 56 ( 90 )
## Mu = 17.232 5.044 -2.122 0.328
## Eta = 0.314 0.819 0.029
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2116.623 -29.275 0.213 8.550
## [2,] -29.275 10.469 -1.641 -2.061
## [3,] 0.213 -1.641 1.593 0.558
## [4,] 8.550 -2.061 0.558 1.444
##
## main 56 ( 90 ) Accepts 16 / 30
## .main 57 ( 90 )
## Mu = -8.083 4.933 -1.733 0.976
## Eta = 0.234 0.884 -0.206
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 6548.491 -94.924 45.988 -20.567
## [2,] -94.924 8.928 0.124 -0.152
## [3,] 45.988 0.124 2.111 -0.247
## [4,] -20.567 -0.152 -0.247 0.573
##
## main 57 ( 90 ) Accepts 15 / 30
## .main 58 ( 90 )
## Mu = 80.952 5.335 -1.814 0.68
## Eta = 0.119 0.984 0.148
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 7788.476 -130.370 23.762 44.963
## [2,] -130.370 6.013 -1.971 -0.054
## [3,] 23.762 -1.971 1.396 -0.471
## [4,] 44.963 -0.054 -0.471 1.441
##
## main 58 ( 90 ) Accepts 15 / 30
## .main 59 ( 90 )
## Mu = 59.647 7.293 -0.461 0.812
## Eta = 0.026 0.96 -0.198
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3880.388 -71.379 20.001 41.787
## [2,] -71.379 7.663 -1.098 0.144
## [3,] 20.001 -1.098 1.382 -0.275
## [4,] 41.787 0.144 -0.275 1.230
##
## main 59 ( 90 ) Accepts 16 / 30
## .main 60 ( 90 )
## Mu = 95.63 2.728 1.102 -0.299
## Eta = 0.04 1.012 -0.338
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5526.328 -123.461 -10.288 18.766
## [2,] -123.461 5.433 -0.766 -0.507
## [3,] -10.288 -0.766 2.719 -0.397
## [4,] 18.766 -0.507 -0.397 0.580
##
## main 60 ( 90 ) Accepts 11 / 30
## .main 61 ( 90 )
## Mu = 59.977 0.63 -1.133 0.12
## Eta = 0.029 1.006 -0.273
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4287.339 -101.219 53.533 -22.075
## [2,] -101.219 7.231 -0.449 0.042
## [3,] 53.533 -0.449 5.035 -2.209
## [4,] -22.075 0.042 -2.209 1.451
##
## main 61 ( 90 ) Accepts 12 / 30
## .main 62 ( 90 )
## Mu = 3.98 4.494 -1.005 0.705
## Eta = -0.034 1.199 -0.301
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2897.069 53.608 -16.133 19.805
## [2,] 53.608 13.763 -0.726 2.697
## [3,] -16.133 -0.726 1.060 -0.389
## [4,] 19.805 2.697 -0.389 1.105
##
## main 62 ( 90 ) Accepts 16 / 30
## .main 63 ( 90 )
## Mu = 10.068 5.47 -1.388 0.702
## Eta = -0.05 0.947 -0.332
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 7497.722 -117.356 88.999 41.539
## [2,] -117.356 4.925 -0.366 -1.337
## [3,] 88.999 -0.366 7.787 -1.436
## [4,] 41.539 -1.337 -1.436 1.451
##
## main 63 ( 90 ) Accepts 19 / 30
## .main 64 ( 90 )
## Mu = 46.21 5.594 -2.057 2.412
## Eta = 0.207 0.993 0.023
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3748.563 -51.939 16.855 18.317
## [2,] -51.939 5.078 -0.944 1.118
## [3,] 16.855 -0.944 1.195 -0.117
## [4,] 18.317 1.118 -0.117 1.279
##
## main 64 ( 90 ) Accepts 14 / 30
## .main 65 ( 90 )
## Mu = 72.905 2.591 -1.813 1.073
## Eta = 0.32 0.99 -0.217
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4536.009 -106.565 -39.556 -4.545
## [2,] -106.565 5.505 1.542 0.256
## [3,] -39.556 1.542 1.892 -0.074
## [4,] -4.545 0.256 -0.074 0.520
##
## main 65 ( 90 ) Accepts 15 / 30
## .main 66 ( 90 )
## Mu = 21.332 8.541 0.36 1.568
## Eta = 0.283 0.919 -0.326
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3816.378 -203.194 -49.009 -36.286
## [2,] -203.194 20.806 4.459 2.454
## [3,] -49.009 4.459 1.781 0.486
## [4,] -36.286 2.454 0.486 0.757
##
## main 66 ( 90 ) Accepts 20 / 30
## .main 67 ( 90 )
## Mu = -33.488 4.208 -0.547 0.801
## Eta = 0.355 0.955 -0.346
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5462.232 -249.433 -20.313 -11.462
## [2,] -249.433 24.678 -0.308 -0.500
## [3,] -20.313 -0.308 1.344 0.577
## [4,] -11.462 -0.500 0.577 0.836
##
## main 67 ( 90 ) Accepts 15 / 30
## .main 68 ( 90 )
## Mu = 62.308 2.794 -1.016 1.211
## Eta = 0.358 1.016 -0.341
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2742.909 10.363 -3.672 2.350
## [2,] 10.363 6.695 -1.862 1.449
## [3,] -3.672 -1.862 1.693 -0.948
## [4,] 2.350 1.449 -0.948 1.083
##
## main 68 ( 90 ) Accepts 7 / 30
## .main 69 ( 90 )
## Mu = 47.487 4.642 -1.996 1.839
## Eta = 0.375 0.994 -0.135
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1586.714 -33.048 21.636 -20.615
## [2,] -33.048 4.455 -0.407 0.747
## [3,] 21.636 -0.407 1.604 -1.350
## [4,] -20.615 0.747 -1.350 2.164
##
## main 69 ( 90 ) Accepts 18 / 30
## .main 70 ( 90 )
## Mu = 63.243 4.301 -2.588 2.165
## Eta = 0.299 0.936 -0.377
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 6453.270 109.695 4.234 -56.516
## [2,] 109.695 8.680 -1.787 -1.131
## [3,] 4.234 -1.787 1.493 0.262
## [4,] -56.516 -1.131 0.262 4.600
##
## main 70 ( 90 ) Accepts 18 / 30
## .main 71 ( 90 )
## Mu = 78.952 2.254 -1.122 1.195
## Eta = 0.203 0.965 -0.37
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 7127.943 -197.192 49.655 -35.406
## [2,] -197.192 10.351 -2.097 1.457
## [3,] 49.655 -2.097 1.034 -0.387
## [4,] -35.406 1.457 -0.387 1.136
##
## main 71 ( 90 ) Accepts 19 / 30
## .main 72 ( 90 )
## Mu = 63.149 4.529 -1.383 1.254
## Eta = 0.266 0.838 -0.42
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4750.769 -183.836 1.044 -36.731
## [2,] -183.836 16.724 -0.933 4.029
## [3,] 1.044 -0.933 1.145 -0.253
## [4,] -36.731 4.029 -0.253 2.588
##
## main 72 ( 90 ) Accepts 12 / 30
## .main 73 ( 90 )
## Mu = 56.789 4.559 -2.356 0.746
## Eta = 0.234 0.886 -0.441
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 6049.945 -176.234 -38.827 -47.018
## [2,] -176.234 11.924 0.202 -0.034
## [3,] -38.827 0.202 1.649 0.720
## [4,] -47.018 -0.034 0.720 2.350
##
## main 73 ( 90 ) Accepts 13 / 30
## .main 74 ( 90 )
## Mu = 48.432 6.134 -1.19 1.897
## Eta = 0.259 1.055 -0.37
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4168.114 -64.661 -15.949 20.036
## [2,] -64.661 8.468 0.637 0.405
## [3,] -15.949 0.637 0.995 -0.676
## [4,] 20.036 0.405 -0.676 2.226
##
## main 74 ( 90 ) Accepts 16 / 30
## .main 75 ( 90 )
## Mu = 22.201 3.441 -1.034 0.662
## Eta = 0.412 1.159 -0.491
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5791.468 -34.141 -3.454 24.500
## [2,] -34.141 7.249 0.103 -0.071
## [3,] -3.454 0.103 0.422 -0.245
## [4,] 24.500 -0.071 -0.245 0.790
##
## main 75 ( 90 ) Accepts 17 / 30
## .main 76 ( 90 )
## Mu = 79.428 7.632 -1.557 0.738
## Eta = 0.313 1.08 -0.639
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 13661.961 -43.275 91.149 -143.755
## [2,] -43.275 9.855 -2.719 -0.155
## [3,] 91.149 -2.719 2.618 -0.974
## [4,] -143.755 -0.155 -0.974 2.350
##
## main 76 ( 90 ) Accepts 19 / 30
##
## Mu = 79.428 7.632 -1.557 0.738
## Eta = 0.313 1.08 -0.639
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 13661.961 -43.275 91.149 -143.755
## [2,] -43.275 9.855 -2.719 -0.155
## [3,] 91.149 -2.719 2.618 -0.974
## [4,] -143.755 -0.155 -0.974 2.350
##
## .main 77 ( 90 )
## Mu = 57.118 3.67 -1.085 0.881
## Eta = 0.244 1.085 -0.518
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4798.341 -6.241 -1.859 -31.689
## [2,] -6.241 14.637 1.895 -2.503
## [3,] -1.859 1.895 1.410 -0.876
## [4,] -31.689 -2.503 -0.876 1.270
##
## main 77 ( 90 ) Accepts 13 / 30
## .main 78 ( 90 )
## Mu = 18.416 5.251 -1.99 1.776
## Eta = 0.325 0.979 -0.625
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5629.622 -53.164 40.325 -17.700
## [2,] -53.164 5.768 0.870 -0.717
## [3,] 40.325 0.870 4.269 -2.513
## [4,] -17.700 -0.717 -2.513 2.137
##
## main 78 ( 90 ) Accepts 10 / 30
## .main 79 ( 90 )
## Mu = -9.901 5.889 -1.256 1.352
## Eta = 0.297 0.942 -0.576
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 12170.679 -452.903 18.761 -89.056
## [2,] -452.903 23.901 -0.334 2.741
## [3,] 18.761 -0.334 3.731 -1.397
## [4,] -89.056 2.741 -1.397 3.107
##
## main 79 ( 90 ) Accepts 12 / 30
## .main 80 ( 90 )
## Mu = 16.806 5.156 -0.696 0.181
## Eta = 0.273 1.048 -0.578
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4897.757 -121.135 4.919 -17.917
## [2,] -121.135 15.249 -2.642 3.900
## [3,] 4.919 -2.642 1.571 -1.486
## [4,] -17.917 3.900 -1.486 2.750
##
## main 80 ( 90 ) Accepts 16 / 30
## .main 81 ( 90 )
## Mu = -23.268 2.369 -1.767 1.709
## Eta = 0.267 0.935 -0.551
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 18144.091 466.955 127.333 -134.626
## [2,] 466.955 16.129 3.457 -3.805
## [3,] 127.333 3.457 1.942 -1.363
## [4,] -134.626 -3.805 -1.363 1.567
##
## main 81 ( 90 ) Accepts 10 / 30
## .main 82 ( 90 )
## Mu = 56.07 8.449 -2.945 3.495
## Eta = 0.453 0.974 -0.835
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 17209.358 288.878 -266.387 145.479
## [2,] 288.878 10.040 -6.476 4.654
## [3,] -266.387 -6.476 6.633 -4.231
## [4,] 145.479 4.654 -4.231 4.116
##
## main 82 ( 90 ) Accepts 11 / 30
## .main 83 ( 90 )
## Mu = 45.455 5.225 -1.771 0.62
## Eta = 0.516 1.246 -0.68
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3434.107 -90.519 16.349 -14.707
## [2,] -90.519 12.226 -1.163 1.741
## [3,] 16.349 -1.163 0.572 -0.365
## [4,] -14.707 1.741 -0.365 1.031
##
## main 83 ( 90 ) Accepts 15 / 30
## .main 84 ( 90 )
## Mu = 113.437 1.487 -0.222 -0.006
## Eta = 0.462 1.131 -0.414
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 9521.301 -264.570 80.938 -157.683
## [2,] -264.570 17.725 -7.189 11.229
## [3,] 80.938 -7.189 5.838 -6.674
## [4,] -157.683 11.229 -6.674 9.384
##
## main 84 ( 90 ) Accepts 12 / 30
## .main 85 ( 90 )
## Mu = -25.13 5.713 -1.18 -0.202
## Eta = 0.181 1.18 0.014
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 15552.528 -294.622 -56.758 98.828
## [2,] -294.622 12.070 0.693 0.139
## [3,] -56.758 0.693 2.352 -1.313
## [4,] 98.828 0.139 -1.313 2.874
##
## main 85 ( 90 ) Accepts 19 / 30
## .main 86 ( 90 )
## Mu = 63.27 3.016 -0.702 0.125
## Eta = 0.173 1.072 0.122
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 6541.699 -203.548 75.648 -114.148
## [2,] -203.548 14.380 -4.782 6.041
## [3,] 75.648 -4.782 2.568 -2.921
## [4,] -114.148 6.041 -2.921 4.274
##
## main 86 ( 90 ) Accepts 15 / 30
## .main 87 ( 90 )
## Mu = 75.73 4.166 -1.9 2.03
## Eta = 0.009 1.125 0.09
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 9835.149 -147.875 -2.614 -129.470
## [2,] -147.875 7.117 -0.323 2.308
## [3,] -2.614 -0.323 2.238 -0.430
## [4,] -129.470 2.308 -0.430 3.286
##
## main 87 ( 90 ) Accepts 17 / 30
## .main 88 ( 90 )
## Mu = 38.294 4.852 0.062 -0.05
## Eta = -0.091 0.936 -0.538
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5075.132 -71.677 43.226 -103.356
## [2,] -71.677 10.815 -1.347 3.317
## [3,] 43.226 -1.347 4.380 -4.860
## [4,] -103.356 3.317 -4.860 6.927
##
## main 88 ( 90 ) Accepts 16 / 30
## .main 89 ( 90 )
## Mu = 4.239 4.538 -0.928 1.086
## Eta = 0.12 1.188 -0.515
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2226.759 10.672 -4.861 4.882
## [2,] 10.672 14.557 -0.829 -1.067
## [3,] -4.861 -0.829 1.154 -0.530
## [4,] 4.882 -1.067 -0.530 1.291
##
## main 89 ( 90 ) Accepts 17 / 30
## .main 90 ( 90 )
## Mu = 29.292 7.314 -1.505 2.271
## Eta = 0.293 1.172 -0.924
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1838.594 -73.249 -18.006 -12.987
## [2,] -73.249 15.619 -1.372 1.800
## [3,] -18.006 -1.372 1.754 -0.235
## [4,] -12.987 1.800 -0.235 1.481
##
## main 90 ( 90 ) Accepts 18 / 30
## Total duration 49.375 seconds.
fit2
## Note: this summary does not contain a convergence check.
##
## Groups:
## Data1 Data2 Data3
##
## Posterior means and standard deviations for global mean parameters
##
## Total number of runs in the results is 90 .
## Posterior means and standard deviations are averages over 70 MCMC runs (counted after thinning).
##
## Post. Post. cred. cred. p varying Post. cred. cred.
## mean s.d.m. from to s.d. from to
## 1. rate constant IS rate (period 1) 121.3306 ( 1.5586 ) NA NA NA
## 2. rate constant IS rate (period 2) 1.7116 ( 0.9120 ) NA NA NA
## 3. rate constant IS rate (period 4) 3.3695 ( 1.0347 ) NA NA NA
## 4. rate constant IS rate (period 5) 5.4719 ( 1.3183 ) NA NA NA
## 5. rate constant IS rate (period 7) 7.8557 ( 1.0475 ) NA NA NA
## 6. rate constant IS rate (period 8) 3.7912 ( 1.5776 ) NA NA NA
## 7. eval outdegree (density) -1.4052 ( 0.7870 ) -2.9953 0.1438 0.04 + 1.4873 0.7955 2.6364
## 8. eval reciprocity 1.0650 ( 0.9067 ) -0.4224 2.7724 0.89 + 1.5721 0.7437 3.0678
## 9. eval transitive triplets 0.4824 ( 0.3157 ) -0.0386 1.0855 0.96 - NA NA NA
## 10. eval val 0.8527 ( 0.2438 ) 0.3514 1.1909 1.00 - NA NA NA
## 11. eval ae ego -0.3610 ( 0.2607 ) -0.8542 0.1293 0.14 - NA NA NA
##
## Posterior mean of global covariance matrix (varying parameters)
## 9422.0361 -143.6653 -7.8452 -4.7804
## -143.6653 14.8624 -0.8373 1.4848
## -7.8452 -0.8373 2.2119 -0.6851
## -4.7804 1.4848 -0.6851 2.4714
##
## Posterior standard deviations of elements of global covariance matrix
## 15086.4854 246.8342 111.7389 144.0621
## 246.8342 13.0012 2.4988 3.6768
## 111.7389 2.4988 1.7631 1.8337
## 144.0621 3.6768 1.8337 2.2622
sink("results_of_model.txt", append=T)
fit2
## Note: this summary does not contain a convergence check.
##
## Groups:
## Data1 Data2 Data3
##
## Posterior means and standard deviations for global mean parameters
##
## Total number of runs in the results is 90 .
## Posterior means and standard deviations are averages over 70 MCMC runs (counted after thinning).
##
## Post. Post. cred. cred. p varying Post. cred. cred.
## mean s.d.m. from to s.d. from to
## 1. rate constant IS rate (period 1) 121.3306 ( 1.5586 ) NA NA NA
## 2. rate constant IS rate (period 2) 1.7116 ( 0.9120 ) NA NA NA
## 3. rate constant IS rate (period 4) 3.3695 ( 1.0347 ) NA NA NA
## 4. rate constant IS rate (period 5) 5.4719 ( 1.3183 ) NA NA NA
## 5. rate constant IS rate (period 7) 7.8557 ( 1.0475 ) NA NA NA
## 6. rate constant IS rate (period 8) 3.7912 ( 1.5776 ) NA NA NA
## 7. eval outdegree (density) -1.4052 ( 0.7870 ) -2.9953 0.1438 0.04 + 1.4873 0.7955 2.6364
## 8. eval reciprocity 1.0650 ( 0.9067 ) -0.4224 2.7724 0.89 + 1.5721 0.7437 3.0678
## 9. eval transitive triplets 0.4824 ( 0.3157 ) -0.0386 1.0855 0.96 - NA NA NA
## 10. eval val 0.8527 ( 0.2438 ) 0.3514 1.1909 1.00 - NA NA NA
## 11. eval ae ego -0.3610 ( 0.2607 ) -0.8542 0.1293 0.14 - NA NA NA
##
## Posterior mean of global covariance matrix (varying parameters)
## 9422.0361 -143.6653 -7.8452 -4.7804
## -143.6653 14.8624 -0.8373 1.4848
## -7.8452 -0.8373 2.2119 -0.6851
## -4.7804 1.4848 -0.6851 2.4714
##
## Posterior standard deviations of elements of global covariance matrix
## 15086.4854 246.8342 111.7389 144.0621
## 246.8342 13.0012 2.4988 3.6768
## 111.7389 2.4988 1.7631 1.8337
## 144.0621 3.6768 1.8337 2.2622
sink()
Again, we’ll be inspecting the convergence plots.
RateTracePlots(fit2)
NonRateTracePlots(fit2)
Wow, that backfired. There is a slight backward trend for information retrieval estimates for t1 in Group 1. The estimates for the dyadic and individual covariates are also fluctuating. If this would happen, you should first test the robustness of these results by modifying the parameters for the Markov Chain. For example, you could run: fit3 <- sienaBayes(ir_algo, data=ir, effects=ir_effect, nwarm=20, nmain=100, nrunMHBatches=10, silentstart=T, initgainGlobal = 0, initgainGroupwise = 0).
To inspect the model, run convergence test you can load the saved model fit3.
fit3 <- sienaBayes(ir_algo, data=ir, effects=ir_effect, nwarm=20, nmain=100, nrunMHBatches=10, silentstart=T, initgainGlobal = 0, initgainGroupwise = 0)
##
## Estimate initial global parameters
## Initial global estimates
## Estimates, standard errors and convergence t-ratios
##
## Estimate Standard Convergence
## Error t-ratio
## 1. rate constant IS rate (period 1) 4.3692 ( 8.5472 ) -1.8561
## 2. rate constant IS rate (period 2) 0.6769 ( 0.5581 ) 0.5856
## 3. rate constant IS rate (period 4) 2.4800 ( 4.1263 ) -0.2986
## 4. rate constant IS rate (period 5) 1.9077 ( 1.5701 ) 0.1026
## 5. rate constant IS rate (period 7) 3.8571 ( 2.9802 ) -0.6101
## 6. rate constant IS rate (period 8) 1.6316 ( 0.9466 ) 0.8369
## 7. eval outdegree (density) -0.3923 ( 0.5194 ) -1.0950
## 8. eval reciprocity 0.0000 ( 0.6030 ) -2.4426
## 9. eval transitive triplets 0.0000 ( 0.4048 ) -2.7710
## 10. eval val 0.0000 ( 0.2183 ) -3.3581
## 11. eval ae ego 0.0000 ( 0.5176 ) -0.9638
##
## Overall maximum convergence ratio: 5.4349
##
##
## Total of 500 iteration steps.
##
##
##
## maximum initial global estimate is 4.369231
## Group 1
## Estimate initial parameters group 1
##
## Initial estimate obtained
## 4.369 0.677 -0.392 0.000 0.000 0.000 0.000
## Group 2
## Estimate initial parameters group 2
##
## Initial estimate obtained
## 2.480 1.908 -0.392 0.000 0.000 0.000 0.000
## Group 3
## Estimate initial parameters group 3
##
## Initial estimate obtained
## 3.857 1.632 -0.392 0.000 0.000 0.000 0.000
## Condition priorRatesFromData=2 impossible, changed to 1.
## Initial global model estimates
## Estimates, standard errors and convergence t-ratios
##
## Estimate Standard Convergence
## Error t-ratio
## 1. rate constant IS rate (period 1) 4.3692 ( 8.5472 ) -1.8561
## 2. rate constant IS rate (period 2) 0.6769 ( 0.5581 ) 0.5856
## 3. rate constant IS rate (period 4) 2.4800 ( 4.1263 ) -0.2986
## 4. rate constant IS rate (period 5) 1.9077 ( 1.5701 ) 0.1026
## 5. rate constant IS rate (period 7) 3.8571 ( 2.9802 ) -0.6101
## 6. rate constant IS rate (period 8) 1.6316 ( 0.9466 ) 0.8369
## 7. eval outdegree (density) -0.3923 ( 0.5194 ) -1.0950
## 8. eval reciprocity 0.0000 ( 0.6030 ) -2.4426
## 9. eval transitive triplets 0.0000 ( 0.4048 ) -2.7710
## 10. eval val 0.0000 ( 0.2183 ) -3.3581
## 11. eval ae ego 0.0000 ( 0.5176 ) -0.9638
##
## Overall maximum convergence ratio: 5.4349
##
##
## Total of 500 iteration steps.
##
## 3.063
## improveMH
## Desired acceptances 25 .
## ..........
## 1 . 28.9 31.3 26.4 20.9 19.5
## multipliers 1.091 1.146 1.032 0.904 0.872
## scaleFactors 0.779 0.818 0.737 0.646 0.623
## ..........
## 2 . 30.8 25.9 26.0 24.2 27.3
## multipliers 1.112 1.017 1.019 0.985 1.044
## scaleFactors 0.867 0.832 0.751 0.636 0.651
## ..........
## 3 . 28.1 24.0 26.9 24.1 26.9
## multipliers 1.054 0.983 1.033 0.983 1.033
## scaleFactors 0.913 0.818 0.776 0.625 0.672
## fine tuning took 3 iterations.
## improveMH 3.859 seconds.
## .Warming step 1 ( 20 )
## Accepts 12 / 30
## .Warming step 2 ( 20 )
## Accepts 15 / 30
## .Warming step 3 ( 20 )
## Accepts 12 / 30
## .Warming step 4 ( 20 )
## Accepts 14 / 30
## .Warming step 5 ( 20 )
## Accepts 11 / 30
## .Warming step 6 ( 20 )
## Accepts 13 / 30
## .Warming step 7 ( 20 )
## Accepts 14 / 30
## .Warming step 8 ( 20 )
## Accepts 10 / 30
## .Warming step 9 ( 20 )
## Accepts 15 / 30
## .Warming step 10 ( 20 )
## Accepts 12 / 30
## .Warming step 11 ( 20 )
## Accepts 15 / 30
## .Warming step 12 ( 20 )
## Accepts 9 / 30
## .Warming step 13 ( 20 )
## Accepts 10 / 30
## .Warming step 14 ( 20 )
## Accepts 17 / 30
## .Warming step 15 ( 20 )
## Accepts 13 / 30
## .Warming step 16 ( 20 )
## Accepts 13 / 30
## .Warming step 17 ( 20 )
## Accepts 12 / 30
## .Warming step 18 ( 20 )
## Accepts 13 / 30
## .Warming step 19 ( 20 )
## Accepts 17 / 30
## .Warming step 20 ( 20 )
## Accepts 17 / 30
## [1] "end of warming"
## warming took 2.826 seconds.
## Parameter values after warming up
## 1 . 3.191 1.903 0.209 -0.209 -0.068 1.509 0.602
## 2 . 3.167 1.953 -1.767 0.323 -0.068 1.509 0.602
## 3 . 3.764 2.107 -0.587 -0.016 -0.068 1.509 0.602
##
## Second improveMH
## Desired acceptances 25 .
## ..........
## 1 . 12.7 33.4 25.1 21.0 20.5
## multipliers 0.500 1.194 1.003 0.909 0.895
## scaleFactors 0.457 0.977 0.778 0.568 0.602
## ..........
## 2 . 37.4 18.8 23.0 19.3 18.7
## multipliers 2.000 0.879 0.961 0.889 0.878
## scaleFactors 0.913 0.859 0.748 0.505 0.528
## ..........
## 3 . 23.7 20.6 22.9 20.6 19.0
## multipliers 0.977 0.922 0.964 0.923 0.894
## scaleFactors 0.892 0.793 0.721 0.467 0.472
## ..........
## 4 . 25.2 23.9 24.4 22.9 20.7
## multipliers 1.004 0.982 0.991 0.966 0.930
## scaleFactors 0.896 0.778 0.714 0.451 0.439
## fine tuning took 4 iterations.
## Second improveMH 4.352 seconds.
## .main 21 ( 120 )
## Mu = 3.27 1.887 -0.385 -0.158
## Eta = 0.148 1.356 0.76
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3.7093 -2.3122 0.4678 -0.1485
## [2,] -2.3122 1.8772 -0.5272 0.1039
## [3,] 0.4678 -0.5272 0.5959 -0.0316
## [4,] -0.1485 0.1039 -0.0316 0.8100
##
## main 21 ( 120 ) Accepts 12 / 30
## .main 22 ( 120 )
## Mu = 2.583 2.548 -1.681 0.243
## Eta = 0.01 1.607 0.529
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.4375 -0.5439 0.2369 0.2697
## [2,] -0.5439 0.9934 -0.1142 -0.0393
## [3,] 0.2369 -0.1142 0.8506 -1.1766
## [4,] 0.2697 -0.0393 -1.1766 3.3245
##
## main 22 ( 120 ) Accepts 15 / 30
## .main 23 ( 120 )
## Mu = 2.931 1.575 -0.328 -1.232
## Eta = 0.307 1.995 0.592
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.2833 -0.7138 0.4953 -0.4316
## [2,] -0.7138 1.2250 0.4650 1.2953
## [3,] 0.4953 0.4650 1.4899 0.9540
## [4,] -0.4316 1.2953 0.9540 2.1557
##
## main 23 ( 120 ) Accepts 18 / 30
## .main 24 ( 120 )
## Mu = 2.834 2.223 -0.93 0.447
## Eta = 0.245 2.103 0.592
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.3226 -0.8757 0.1285 0.1236
## [2,] -0.8757 1.0122 -0.2757 0.3604
## [3,] 0.1285 -0.2757 2.1650 -0.9650
## [4,] 0.1236 0.3604 -0.9650 1.5566
##
## main 24 ( 120 ) Accepts 17 / 30
## .main 25 ( 120 )
## Mu = 3.437 1.439 -1.299 -1.198
## Eta = 0.242 1.904 -0.638
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.9552 -1.3430 -0.3804 -0.9419
## [2,] -1.3430 1.1288 0.1325 0.6427
## [3,] -0.3804 0.1325 2.1029 0.1636
## [4,] -0.9419 0.6427 0.1636 1.3234
##
## main 25 ( 120 ) Accepts 11 / 30
## .main 26 ( 120 )
## Mu = 4.021 2.044 -0.016 0.289
## Eta = -0.032 1.706 -0.277
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 7.3597 -3.5528 -2.7595 -0.4249
## [2,] -3.5528 2.3925 0.6177 1.1641
## [3,] -2.7595 0.6177 3.0241 -0.6753
## [4,] -0.4249 1.1641 -0.6753 2.2380
##
## main 26 ( 120 ) Accepts 10 / 30
## .main 27 ( 120 )
## Mu = 1.999 3.026 -0.785 -0.35
## Eta = 0.018 1.541 0.307
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.9681 -0.5504 0.1662 0.3102
## [2,] -0.5504 0.5555 -0.1562 0.0211
## [3,] 0.1662 -0.1562 0.5901 -0.3207
## [4,] 0.3102 0.0211 -0.3207 2.1247
##
## main 27 ( 120 ) Accepts 19 / 30
## .main 28 ( 120 )
## Mu = 2.133 2.577 -0.455 0.184
## Eta = 0.231 0.874 0.537
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 7.0824 -3.4254 -1.0762 -1.6512
## [2,] -3.4254 1.7849 0.3847 0.8316
## [3,] -1.0762 0.3847 2.0067 -0.4439
## [4,] -1.6512 0.8316 -0.4439 1.1851
##
## main 28 ( 120 ) Accepts 14 / 30
## .main 29 ( 120 )
## Mu = 2.078 3.034 -1.056 0.847
## Eta = 0.205 0.824 0.688
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.4137 -1.2053 0.4377 -0.3863
## [2,] -1.2053 1.8303 -0.2436 0.3274
## [3,] 0.4377 -0.2436 0.6737 -0.3018
## [4,] -0.3863 0.3274 -0.3018 1.1355
##
## main 29 ( 120 ) Accepts 9 / 30
## .main 30 ( 120 )
## Mu = 1.965 2.108 0.448 0.325
## Eta = 0.268 0.848 0.012
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 7.3484 -2.1829 -3.1312 0.5508
## [2,] -2.1829 1.9974 -0.2655 0.4124
## [3,] -3.1312 -0.2655 3.0505 -0.5283
## [4,] 0.5508 0.4124 -0.5283 1.0116
##
## main 30 ( 120 ) Accepts 14 / 30
## .main 31 ( 120 )
## Mu = 4.171 1.857 -2.527 0.78
## Eta = -0.022 0.612 0.578
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.8870 0.3432 -2.2945 -1.9923
## [2,] 0.3432 1.3984 -1.6894 -0.2000
## [3,] -2.2945 -1.6894 5.0801 1.2633
## [4,] -1.9923 -0.2000 1.2633 2.2479
##
## main 31 ( 120 ) Accepts 15 / 30
## .main 32 ( 120 )
## Mu = 3.388 1.599 -0.23 -0.296
## Eta = 0.207 0.736 -0.377
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.4834 -0.9647 0.1493 -0.3601
## [2,] -0.9647 1.3497 0.6786 0.0046
## [3,] 0.1493 0.6786 2.0015 -1.5445
## [4,] -0.3601 0.0046 -1.5445 2.5233
##
## main 32 ( 120 ) Accepts 12 / 30
## .main 33 ( 120 )
## Mu = 2.504 2.234 -1.275 1.214
## Eta = 0.368 0.735 -1.019
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3.0590 -2.0792 1.1115 -2.7057
## [2,] -2.0792 1.6012 -0.7978 1.9044
## [3,] 1.1115 -0.7978 1.0641 -0.9471
## [4,] -2.7057 1.9044 -0.9471 4.0325
##
## main 33 ( 120 ) Accepts 10 / 30
## .main 34 ( 120 )
## Mu = 3.676 0.72 0.62 -0.264
## Eta = 0.399 1.031 -1.159
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.5024 -1.0557 1.0444 -0.6818
## [2,] -1.0557 3.2474 -3.1252 0.7216
## [3,] 1.0444 -3.1252 5.7090 -0.9137
## [4,] -0.6818 0.7216 -0.9137 0.8983
##
## main 34 ( 120 ) Accepts 22 / 30
## .main 35 ( 120 )
## Mu = 4.402 0.064 -0.971 0.101
## Eta = 0.135 0.96 -1.368
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.3808 -2.6563 -0.3145 -0.8927
## [2,] -2.6563 4.4449 -2.1335 0.0557
## [3,] -0.3145 -2.1335 5.7321 1.7237
## [4,] -0.8927 0.0557 1.7237 1.7044
##
## main 35 ( 120 ) Accepts 16 / 30
## .main 36 ( 120 )
## Mu = 3.132 0.978 -0.634 0.977
## Eta = -0.023 1.397 -1.293
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.2487 -0.5076 0.2043 0.1416
## [2,] -0.5076 0.6180 -0.1463 -0.2305
## [3,] 0.2043 -0.1463 0.4776 -0.0642
## [4,] 0.1416 -0.2305 -0.0642 0.3903
##
## main 36 ( 120 ) Accepts 18 / 30
## .main 37 ( 120 )
## Mu = 2.838 3.255 -1.206 1.839
## Eta = -0.696 1.401 -0.199
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.9241 -1.7007 -0.0229 0.3628
## [2,] -1.7007 2.3077 -0.5553 -0.1052
## [3,] -0.0229 -0.5553 2.5107 -0.4782
## [4,] 0.3628 -0.1052 -0.4782 0.8093
##
## main 37 ( 120 ) Accepts 18 / 30
## .main 38 ( 120 )
## Mu = 2.994 0.975 -0.52 0.207
## Eta = -0.591 1.294 0.447
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.4246 -4.3730 3.5832 -3.3526
## [2,] -4.3730 10.6151 -7.5113 6.2501
## [3,] 3.5832 -7.5113 8.5949 -7.4885
## [4,] -3.3526 6.2501 -7.4885 7.5246
##
## main 38 ( 120 ) Accepts 17 / 30
## .main 39 ( 120 )
## Mu = 2.942 2.84 -0.192 -1.349
## Eta = -0.313 1.552 0.351
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.1104 -1.5107 -0.3209 -0.6352
## [2,] -1.5107 1.9760 -0.0771 0.0140
## [3,] -0.3209 -0.0771 1.6957 0.7068
## [4,] -0.6352 0.0140 0.7068 1.9955
##
## main 39 ( 120 ) Accepts 18 / 30
## .main 40 ( 120 )
## Mu = 2.479 2.46 -0.875 0.495
## Eta = -0.215 1.547 0.057
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.1865 -0.9547 1.1672 -0.0759
## [2,] -0.9547 1.1833 -1.3159 0.0820
## [3,] 1.1672 -1.3159 3.6424 0.4185
## [4,] -0.0759 0.0820 0.4185 0.8132
##
## main 40 ( 120 ) Accepts 16 / 30
## .main 41 ( 120 )
## Mu = 3.082 1.973 0.612 0.316
## Eta = -0.308 1.757 -0.015
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.600 -1.332 0.622 0.278
## [2,] -1.332 1.023 -0.696 -0.027
## [3,] 0.622 -0.696 2.325 -0.358
## [4,] 0.278 -0.027 -0.358 1.194
##
## main 41 ( 120 ) Accepts 13 / 30
## .main 42 ( 120 )
## Mu = 2.42 2.593 -0.674 0.776
## Eta = -0.281 1.569 0.39
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.856 -1.737 0.709 -1.055
## [2,] -1.737 2.167 -0.819 1.911
## [3,] 0.709 -0.819 1.130 -1.105
## [4,] -1.055 1.911 -1.105 3.676
##
## main 42 ( 120 ) Accepts 14 / 30
## .main 43 ( 120 )
## Mu = 2.759 1.709 -0.644 1.319
## Eta = 0.469 1.991 1.049
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.403 -1.565 0.137 -1.441
## [2,] -1.565 1.462 0.446 0.415
## [3,] 0.137 0.446 1.983 -0.646
## [4,] -1.441 0.415 -0.646 2.301
##
## main 43 ( 120 ) Accepts 17 / 30
## .main 44 ( 120 )
## Mu = 2.838 2.033 -0.061 0.211
## Eta = 0.324 1.97 1.343
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.151 -0.272 0.262 0.206
## [2,] -0.272 0.545 0.151 0.048
## [3,] 0.262 0.151 2.843 -0.861
## [4,] 0.206 0.048 -0.861 1.117
##
## main 44 ( 120 ) Accepts 15 / 30
## .main 45 ( 120 )
## Mu = 1.93 2.843 -1.239 1.224
## Eta = 0.138 1.652 0.529
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.903 -0.386 0.095 -0.022
## [2,] -0.386 0.400 0.030 0.003
## [3,] 0.095 0.030 0.954 -0.226
## [4,] -0.022 0.003 -0.226 0.875
##
## main 45 ( 120 ) Accepts 21 / 30
## .main 46 ( 120 )
## Mu = 2.957 2.902 0.129 0.719
## Eta = 0.297 1.703 0.442
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3.387 -1.833 2.289 -0.152
## [2,] -1.833 1.781 -1.509 0.041
## [3,] 2.289 -1.509 2.637 0.200
## [4,] -0.152 0.041 0.200 0.625
##
## main 46 ( 120 ) Accepts 15 / 30
## .main 47 ( 120 )
## Mu = 2.9 2.998 -0.478 -0.103
## Eta = 0.157 1.854 0.622
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.197 0.350 0.501 -0.962
## [2,] 0.350 1.786 0.339 -1.269
## [3,] 0.501 0.339 0.804 -0.558
## [4,] -0.962 -1.269 -0.558 4.758
##
## main 47 ( 120 ) Accepts 15 / 30
## .main 48 ( 120 )
## Mu = 1.779 1.905 0.007 0.063
## Eta = 0.289 0.981 0.697
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.974 -0.986 0.053 -0.587
## [2,] -0.986 1.544 -0.501 0.497
## [3,] 0.053 -0.501 1.132 -1.084
## [4,] -0.587 0.497 -1.084 1.928
##
## main 48 ( 120 ) Accepts 19 / 30
## .main 49 ( 120 )
## Mu = 3.779 0.873 1.102 0.275
## Eta = 0.298 1.234 0.525
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3.430 -2.285 -0.936 -0.001
## [2,] -2.285 2.019 0.449 -0.260
## [3,] -0.936 0.449 2.100 -0.253
## [4,] -0.001 -0.260 -0.253 1.233
##
## main 49 ( 120 ) Accepts 14 / 30
## .main 50 ( 120 )
## Mu = 2.422 2.481 -1.114 1.411
## Eta = -0.058 1.762 0.296
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.934 -0.976 -0.011 -0.051
## [2,] -0.976 2.411 -0.093 0.608
## [3,] -0.011 -0.093 0.488 -0.126
## [4,] -0.051 0.608 -0.126 1.096
##
## main 50 ( 120 ) Accepts 19 / 30
## .main 51 ( 120 )
## Mu = 2.312 2.619 -0.359 -1.386
## Eta = -0.23 1.997 -0.061
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3.283 -2.223 0.403 -0.698
## [2,] -2.223 2.278 -0.317 1.095
## [3,] 0.403 -0.317 0.630 0.097
## [4,] -0.698 1.095 0.097 2.275
##
## main 51 ( 120 ) Accepts 10 / 30
## .main 52 ( 120 )
## Mu = 2.427 2.04 1.011 -0.588
## Eta = -0.318 1.761 0.389
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.323 -0.108 -0.089 0.149
## [2,] -0.108 0.610 -0.339 0.009
## [3,] -0.089 -0.339 3.735 -0.365
## [4,] 0.149 0.009 -0.365 0.841
##
## main 52 ( 120 ) Accepts 14 / 30
## .main 53 ( 120 )
## Mu = 2.954 2.123 0.561 0.238
## Eta = -0.663 1.97 -0.797
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.157 -0.059 -0.146 0.038
## [2,] -0.059 4.047 1.118 3.086
## [3,] -0.146 1.118 1.865 0.700
## [4,] 0.038 3.086 0.700 2.821
##
## main 53 ( 120 ) Accepts 14 / 30
## .main 54 ( 120 )
## Mu = 2.854 1.769 -0.166 -0.605
## Eta = -0.46 1.979 -0.698
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.824 -0.802 -0.484 0.471
## [2,] -0.802 0.672 0.022 -0.240
## [3,] -0.484 0.022 1.477 0.010
## [4,] 0.471 -0.240 0.010 0.815
##
## main 54 ( 120 ) Accepts 11 / 30
## .main 55 ( 120 )
## Mu = 2.715 2.19 -0.256 -0.175
## Eta = -0.128 1.851 0.479
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3.138 -1.132 -0.247 0.285
## [2,] -1.132 0.609 0.162 -0.236
## [3,] -0.247 0.162 0.550 -0.017
## [4,] 0.285 -0.236 -0.017 0.763
##
## main 55 ( 120 ) Accepts 15 / 30
## .main 56 ( 120 )
## Mu = 2.985 1.347 -0.497 1.516
## Eta = 0.036 1.705 1.417
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3.138 -0.891 0.460 -0.499
## [2,] -0.891 1.509 0.579 -0.700
## [3,] 0.460 0.579 0.893 -0.587
## [4,] -0.499 -0.700 -0.587 1.183
##
## main 56 ( 120 ) Accepts 13 / 30
## .main 57 ( 120 )
## Mu = 2.493 2.101 -0.002 0.39
## Eta = 0.319 1.428 1.336
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.798 -0.606 0.082 -0.127
## [2,] -0.606 1.152 0.046 -0.149
## [3,] 0.082 0.046 1.699 0.200
## [4,] -0.127 -0.149 0.200 0.621
##
## main 57 ( 120 ) Accepts 16 / 30
## .main 58 ( 120 )
## Mu = 3.052 1.819 -1.602 -0.856
## Eta = 0.215 1.388 1.131
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.786 -0.963 -0.939 -2.466
## [2,] -0.963 2.246 0.676 4.318
## [3,] -0.939 0.676 1.310 2.503
## [4,] -2.466 4.318 2.503 11.575
##
## main 58 ( 120 ) Accepts 23 / 30
## .main 59 ( 120 )
## Mu = 2.519 1.808 -0.918 -0.2
## Eta = 0.744 1.653 0.417
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.666 -0.024 -0.298 -0.517
## [2,] -0.024 0.715 0.484 -0.682
## [3,] -0.298 0.484 2.297 0.076
## [4,] -0.517 -0.682 0.076 1.458
##
## main 59 ( 120 ) Accepts 13 / 30
## .main 60 ( 120 )
## Mu = 3.072 1.629 -0.749 0.493
## Eta = 1 1.442 0.195
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.350 -0.434 0.416 -0.222
## [2,] -0.434 0.301 -0.087 -0.003
## [3,] 0.416 -0.087 0.610 -0.139
## [4,] -0.222 -0.003 -0.139 0.585
##
## main 60 ( 120 ) Accepts 15 / 30
## .main 61 ( 120 )
## Mu = 3.389 1.77 -0.572 0.777
## Eta = 0.457 1.574 0.257
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.795 -1.500 0.508 0.266
## [2,] -1.500 1.539 -0.312 -0.481
## [3,] 0.508 -0.312 0.845 -0.270
## [4,] 0.266 -0.481 -0.270 1.002
##
## main 61 ( 120 ) Accepts 15 / 30
## .main 62 ( 120 )
## Mu = 3.066 2.585 -1.123 0.717
## Eta = 0.473 1.71 0.26
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.042 -0.813 0.508 -0.609
## [2,] -0.813 1.066 -0.507 0.690
## [3,] 0.508 -0.507 0.991 -0.971
## [4,] -0.609 0.690 -0.971 1.709
##
## main 62 ( 120 ) Accepts 11 / 30
## .main 63 ( 120 )
## Mu = 2.387 2.959 -1.189 -0.689
## Eta = 0.422 2.157 0.279
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.585 -0.177 0.313 0.184
## [2,] -0.177 0.344 -0.017 -0.132
## [3,] 0.313 -0.017 1.239 -0.264
## [4,] 0.184 -0.132 -0.264 1.084
##
## main 63 ( 120 ) Accepts 16 / 30
## .main 64 ( 120 )
## Mu = 2.976 2.405 -0.529 -0.174
## Eta = 0.218 1.892 0.126
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.771 -1.702 0.244 -1.904
## [2,] -1.702 1.585 -0.116 0.816
## [3,] 0.244 -0.116 0.535 -0.580
## [4,] -1.904 0.816 -0.580 2.748
##
## main 64 ( 120 ) Accepts 12 / 30
## .main 65 ( 120 )
## Mu = 2.492 3.009 -0.53 1.394
## Eta = 0.114 2.104 -0.798
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.592 -0.728 -0.008 -0.841
## [2,] -0.728 1.231 -0.669 -0.284
## [3,] -0.008 -0.669 1.747 -0.198
## [4,] -0.841 -0.284 -0.198 4.201
##
## main 65 ( 120 ) Accepts 15 / 30
## .main 66 ( 120 )
## Mu = 1.811 1.729 -1.968 -3.092
## Eta = -0.005 1.864 0.321
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3.357 -0.630 2.860 5.051
## [2,] -0.630 1.620 0.240 2.744
## [3,] 2.860 0.240 3.888 6.692
## [4,] 5.051 2.744 6.692 18.372
##
## main 66 ( 120 ) Accepts 20 / 30
## .main 67 ( 120 )
## Mu = 2.29 2.273 -1.276 2.118
## Eta = 0.146 1.476 0.903
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.151 -0.741 1.024 0.182
## [2,] -0.741 1.292 -0.495 -0.737
## [3,] 1.024 -0.495 1.939 0.542
## [4,] 0.182 -0.737 0.542 2.767
##
## main 67 ( 120 ) Accepts 11 / 30
## .main 68 ( 120 )
## Mu = 2.21 2.395 -0.516 0.492
## Eta = 0.303 1.257 -0.025
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.549 -0.320 0.193 -0.277
## [2,] -0.320 0.427 0.026 0.065
## [3,] 0.193 0.026 1.800 -0.213
## [4,] -0.277 0.065 -0.213 1.055
##
## main 68 ( 120 ) Accepts 12 / 30
## .main 69 ( 120 )
## Mu = 2.581 2.417 -0.442 1.004
## Eta = 0.074 1.409 -0.818
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.625 -0.704 -0.142 -0.001
## [2,] -0.704 1.143 -0.500 0.956
## [3,] -0.142 -0.500 1.052 -1.035
## [4,] -0.001 0.956 -1.035 2.012
##
## main 69 ( 120 ) Accepts 11 / 30
## .main 70 ( 120 )
## Mu = 2.919 2.497 -0.506 0.572
## Eta = -0.054 1.631 -0.571
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.523 -0.230 0.390 0.398
## [2,] -0.230 0.518 -0.184 -0.114
## [3,] 0.390 -0.184 1.031 -0.114
## [4,] 0.398 -0.114 -0.114 2.960
##
## main 70 ( 120 ) Accepts 14 / 30
## .main 71 ( 120 )
## Mu = 3.195 1.955 -0.985 1.269
## Eta = -0.174 1.814 -1.35
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.854 -1.742 -0.788 -1.346
## [2,] -1.742 2.250 0.947 1.206
## [3,] -0.788 0.947 1.321 0.502
## [4,] -1.346 1.206 0.502 1.732
##
## main 71 ( 120 ) Accepts 13 / 30
## .main 72 ( 120 )
## Mu = 3.33 1.438 -1.078 1.16
## Eta = 0.069 2.152 -1.184
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.490 -0.722 1.743 1.220
## [2,] -0.722 1.084 -0.217 -0.140
## [3,] 1.743 -0.217 4.599 2.474
## [4,] 1.220 -0.140 2.474 2.659
##
## main 72 ( 120 ) Accepts 20 / 30
## .main 73 ( 120 )
## Mu = 2.699 2.857 -0.469 1.606
## Eta = 0.646 2.211 -0.435
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.122 -0.505 0.443 0.266
## [2,] -0.505 0.868 -0.577 0.050
## [3,] 0.443 -0.577 1.574 -0.200
## [4,] 0.266 0.050 -0.200 1.218
##
## main 73 ( 120 ) Accepts 17 / 30
## .main 74 ( 120 )
## Mu = 4.419 1.6 -1.217 2.881
## Eta = -0.011 2.251 -0.671
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.789 -1.232 -0.678 2.246
## [2,] -1.232 1.918 0.602 -1.942
## [3,] -0.678 0.602 1.334 -1.041
## [4,] 2.246 -1.942 -1.041 5.182
##
## main 74 ( 120 ) Accepts 16 / 30
## .main 75 ( 120 )
## Mu = 3.218 2.29 -1.112 0.51
## Eta = 0.101 2.087 -0.86
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.547 -0.584 -0.343 0.362
## [2,] -0.584 0.519 -0.018 0.106
## [3,] -0.343 -0.018 0.666 -0.503
## [4,] 0.362 0.106 -0.503 1.496
##
## main 75 ( 120 ) Accepts 11 / 30
## .main 76 ( 120 )
## Mu = 3.316 2.194 -0.2 2.343
## Eta = -0.198 2.109 -0.493
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.347 -0.472 -0.051 -0.484
## [2,] -0.472 0.737 0.093 0.006
## [3,] -0.051 0.093 0.758 0.190
## [4,] -0.484 0.006 0.190 1.111
##
## main 76 ( 120 ) Accepts 12 / 30
## .main 77 ( 120 )
## Mu = 2.352 3.198 -2.02 1.84
## Eta = -0.375 1.98 -0.493
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5.181 -2.539 2.354 -0.635
## [2,] -2.539 1.951 -1.283 0.548
## [3,] 2.354 -1.283 2.649 0.005
## [4,] -0.635 0.548 0.005 1.175
##
## main 77 ( 120 ) Accepts 19 / 30
## .main 78 ( 120 )
## Mu = 4.77 1.965 -0.003 0.359
## Eta = -0.475 2.196 -0.468
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3.429 -0.991 1.762 -1.158
## [2,] -0.991 1.045 0.091 0.185
## [3,] 1.762 0.091 2.637 -1.456
## [4,] -1.158 0.185 -1.456 1.620
##
## main 78 ( 120 ) Accepts 22 / 30
## .main 79 ( 120 )
## Mu = 5.725 0.52 -0.48 0.153
## Eta = -1.05 2.222 -1.186
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 5.374 -4.385 1.076 -3.862
## [2,] -4.385 4.749 -1.542 4.304
## [3,] 1.076 -1.542 1.139 -1.480
## [4,] -3.862 4.304 -1.480 5.240
##
## main 79 ( 120 ) Accepts 18 / 30
## .main 80 ( 120 )
## Mu = 3.132 3.298 -1.288 1.461
## Eta = -0.613 2.388 -1.182
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3.675 -1.856 0.814 -0.527
## [2,] -1.856 1.880 -0.944 0.858
## [3,] 0.814 -0.944 0.771 -0.337
## [4,] -0.527 0.858 -0.337 1.677
##
## main 80 ( 120 ) Accepts 19 / 30
## .main 81 ( 120 )
## Mu = 5.25 3.128 -0.275 0.526
## Eta = -0.752 2.473 -1.254
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 7.746 -2.734 0.787 -3.064
## [2,] -2.734 2.528 -0.072 0.665
## [3,] 0.787 -0.072 1.491 -1.380
## [4,] -3.064 0.665 -1.380 2.958
##
## main 81 ( 120 ) Accepts 14 / 30
## .main 82 ( 120 )
## Mu = 3.913 2.041 -1.344 0.998
## Eta = -0.843 2.402 -1.645
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3.189 -1.191 0.694 -0.767
## [2,] -1.191 3.286 1.410 -0.769
## [3,] 0.694 1.410 2.764 -1.766
## [4,] -0.767 -0.769 -1.766 2.180
##
## main 82 ( 120 ) Accepts 12 / 30
## .main 83 ( 120 )
## Mu = 3.135 3.832 -0.224 1.547
## Eta = -0.566 2.592 -2.219
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.537 -0.644 1.060 -0.652
## [2,] -0.644 2.089 0.256 0.384
## [3,] 1.060 0.256 1.585 -0.005
## [4,] -0.652 0.384 -0.005 0.686
##
## main 83 ( 120 ) Accepts 13 / 30
## .main 84 ( 120 )
## Mu = 2.567 3.871 -2.103 1.939
## Eta = -0.507 2.585 -2.157
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.244 -0.405 1.098 -2.297
## [2,] -0.405 0.757 -0.192 -0.512
## [3,] 1.098 -0.192 2.120 -3.731
## [4,] -2.297 -0.512 -3.731 10.333
##
## main 84 ( 120 ) Accepts 18 / 30
## .main 85 ( 120 )
## Mu = 1.763 2.821 -0.779 0.564
## Eta = -0.272 2.524 -1.449
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.748 -0.693 0.042 0.108
## [2,] -0.693 3.759 -0.298 -1.529
## [3,] 0.042 -0.298 0.385 0.108
## [4,] 0.108 -1.529 0.108 1.521
##
## main 85 ( 120 ) Accepts 11 / 30
## .main 86 ( 120 )
## Mu = 2.69 3.063 -1.293 0.622
## Eta = -0.132 2.21 -1.084
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.815 -0.303 0.274 -0.095
## [2,] -0.303 1.642 0.677 0.120
## [3,] 0.274 0.677 2.104 -0.157
## [4,] -0.095 0.120 -0.157 0.714
##
## main 86 ( 120 ) Accepts 15 / 30
## .main 87 ( 120 )
## Mu = 2.594 2.785 -0.565 1.847
## Eta = -0.304 2.596 -1.449
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.959 -0.584 0.113 -0.871
## [2,] -0.584 1.683 0.104 0.042
## [3,] 0.113 0.104 0.477 -0.319
## [4,] -0.871 0.042 -0.319 1.850
##
## main 87 ( 120 ) Accepts 14 / 30
## .main 88 ( 120 )
## Mu = 2.801 2.189 -0.613 1.583
## Eta = -0.122 2.597 -1.467
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.129 -1.576 -0.065 -0.289
## [2,] -1.576 1.976 0.583 0.392
## [3,] -0.065 0.583 0.843 0.144
## [4,] -0.289 0.392 0.144 0.842
##
## main 88 ( 120 ) Accepts 20 / 30
## .main 89 ( 120 )
## Mu = 2.972 1.709 -0.354 0.436
## Eta = -0.028 2.701 -1.406
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4.264 0.556 0.933 -4.182
## [2,] 0.556 0.505 0.156 -0.893
## [3,] 0.933 0.156 1.009 -1.272
## [4,] -4.182 -0.893 -1.272 5.284
##
## main 89 ( 120 ) Accepts 20 / 30
## .main 90 ( 120 )
## Mu = 3.128 2.215 -0.59 0.832
## Eta = -0.256 2.367 -1.455
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.904 -0.660 1.229 -0.847
## [2,] -0.660 0.540 -0.574 0.316
## [3,] 1.229 -0.574 2.262 -1.308
## [4,] -0.847 0.316 -1.308 1.321
##
## main 90 ( 120 ) Accepts 18 / 30
## .main 91 ( 120 )
## Mu = 4.529 0.686 1.214 0.195
## Eta = -0.184 2.077 -1.791
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4.680 -1.446 2.669 -1.818
## [2,] -1.446 0.672 -0.870 0.524
## [3,] 2.669 -0.870 2.039 -0.932
## [4,] -1.818 0.524 -0.932 1.975
##
## main 91 ( 120 ) Accepts 14 / 30
## .main 92 ( 120 )
## Mu = 3.386 1.228 -0.468 1.069
## Eta = -0.445 1.901 -1.565
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.406 -1.413 -0.143 -0.374
## [2,] -1.413 0.993 0.051 0.163
## [3,] -0.143 0.051 1.542 -0.893
## [4,] -0.374 0.163 -0.893 2.430
##
## main 92 ( 120 ) Accepts 12 / 30
## .main 93 ( 120 )
## Mu = 4.407 1.468 0.035 0.955
## Eta = -0.526 1.797 -1.425
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 4.025 -0.603 0.098 0.756
## [2,] -0.603 1.273 -0.501 0.408
## [3,] 0.098 -0.501 1.361 -1.591
## [4,] 0.756 0.408 -1.591 3.928
##
## main 93 ( 120 ) Accepts 9 / 30
## .main 94 ( 120 )
## Mu = 1.606 2.408 -1.437 1.652
## Eta = -0.958 1.76 -0.867
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.660 -0.149 0.309 -0.255
## [2,] -0.149 0.443 0.775 -0.345
## [3,] 0.309 0.775 5.625 -1.985
## [4,] -0.255 -0.345 -1.985 1.295
##
## main 94 ( 120 ) Accepts 17 / 30
## .main 95 ( 120 )
## Mu = 2.242 2.138 0.258 1.08
## Eta = -0.645 1.716 -0.654
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.312 -0.453 -0.199 -0.072
## [2,] -0.453 0.770 0.123 -0.097
## [3,] -0.199 0.123 0.626 -0.027
## [4,] -0.072 -0.097 -0.027 1.119
##
## main 95 ( 120 ) Accepts 22 / 30
## .main 96 ( 120 )
## Mu = 2.395 3.57 -0.283 0.908
## Eta = -0.611 1.89 -1.108
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3.070 0.552 1.059 -2.777
## [2,] 0.552 2.144 1.496 -2.129
## [3,] 1.059 1.496 3.651 -2.504
## [4,] -2.777 -2.129 -2.504 5.789
##
## main 96 ( 120 ) Accepts 15 / 30
## .main 97 ( 120 )
## Mu = 2.375 2.681 0.017 0.975
## Eta = -0.864 1.929 -1.242
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.681 -0.284 0.031 -0.298
## [2,] -0.284 0.464 -0.441 -0.412
## [3,] 0.031 -0.441 1.463 0.802
## [4,] -0.298 -0.412 0.802 2.436
##
## main 97 ( 120 ) Accepts 16 / 30
## .main 98 ( 120 )
## Mu = 3.72 3.429 -0.587 0.257
## Eta = -0.624 2.391 -1.321
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.832 -0.913 -1.337 0.833
## [2,] -0.913 2.660 1.098 -2.031
## [3,] -1.337 1.098 2.260 -1.173
## [4,] 0.833 -2.031 -1.173 2.530
##
## main 98 ( 120 ) Accepts 14 / 30
## .main 99 ( 120 )
## Mu = 2.335 3.284 -0.838 1.076
## Eta = 0.226 2.351 -0.901
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.999 -0.458 0.491 -0.833
## [2,] -0.458 1.336 0.064 0.384
## [3,] 0.491 0.064 1.134 -0.721
## [4,] -0.833 0.384 -0.721 1.402
##
## main 99 ( 120 ) Accepts 16 / 30
## .main 100 ( 120 )
## Mu = 3.926 2.242 0.014 0.299
## Eta = 0.148 2.115 -1.094
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.213 -2.862 0.180 -0.482
## [2,] -2.862 8.090 1.340 0.440
## [3,] 0.180 1.340 2.138 -0.007
## [4,] -0.482 0.440 -0.007 0.820
##
## main 100 ( 120 ) Accepts 13 / 30
##
## Mu = 3.926 2.242 0.014 0.299
## Eta = 0.148 2.115 -1.094
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.213 -2.862 0.180 -0.482
## [2,] -2.862 8.090 1.340 0.440
## [3,] 0.180 1.340 2.138 -0.007
## [4,] -0.482 0.440 -0.007 0.820
##
## .main 101 ( 120 )
## Mu = 2.727 2.537 -0.21 0.93
## Eta = -0.262 1.881 -0.36
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.353 -0.616 -0.502 -0.775
## [2,] -0.616 1.226 -0.327 -0.231
## [3,] -0.502 -0.327 3.158 1.476
## [4,] -0.775 -0.231 1.476 1.896
##
## main 101 ( 120 ) Accepts 15 / 30
## .main 102 ( 120 )
## Mu = 2.055 3.071 -0.475 0.314
## Eta = -0.374 1.727 -1.054
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.944 -0.579 -0.040 0.030
## [2,] -0.579 0.908 0.378 -0.890
## [3,] -0.040 0.378 0.867 -0.758
## [4,] 0.030 -0.890 -0.758 2.128
##
## main 102 ( 120 ) Accepts 15 / 30
## .main 103 ( 120 )
## Mu = 2.4 2.617 -1.224 1.031
## Eta = 0.086 1.748 -0.874
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.256 -1.247 0.381 -0.146
## [2,] -1.247 2.316 0.290 -0.751
## [3,] 0.381 0.290 1.285 -0.689
## [4,] -0.146 -0.751 -0.689 1.635
##
## main 103 ( 120 ) Accepts 14 / 30
## .main 104 ( 120 )
## Mu = 3 2.58 -1.309 1.455
## Eta = -0.218 1.6 -0.971
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 6.614 -1.942 1.922 -0.310
## [2,] -1.942 0.939 -0.756 0.328
## [3,] 1.922 -0.756 1.350 -0.745
## [4,] -0.310 0.328 -0.745 2.356
##
## main 104 ( 120 ) Accepts 12 / 30
## .main 105 ( 120 )
## Mu = 2.053 1.93 -0.249 1.124
## Eta = -0.398 1.704 -0.496
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.264 0.082 0.381 -0.996
## [2,] 0.082 0.930 -0.480 -0.734
## [3,] 0.381 -0.480 1.048 -0.130
## [4,] -0.996 -0.734 -0.130 2.573
##
## main 105 ( 120 ) Accepts 13 / 30
## .main 106 ( 120 )
## Mu = 2.128 3.059 -0.096 0.771
## Eta = -0.286 1.787 -0.141
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 3.668 -2.529 4.004 -0.723
## [2,] -2.529 2.385 -2.190 -0.032
## [3,] 4.004 -2.190 7.939 -2.053
## [4,] -0.723 -0.032 -2.053 1.928
##
## main 106 ( 120 ) Accepts 6 / 30
## .main 107 ( 120 )
## Mu = 3.124 3.199 -0.135 -0.068
## Eta = -0.574 1.751 -0.402
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.910 -1.135 -0.086 -1.000
## [2,] -1.135 1.181 0.059 0.708
## [3,] -0.086 0.059 0.591 -0.385
## [4,] -1.000 0.708 -0.385 2.970
##
## main 107 ( 120 ) Accepts 18 / 30
## .main 108 ( 120 )
## Mu = 2.29 2.665 -1.914 0.363
## Eta = -0.409 1.695 0.014
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.638 -0.836 -0.110 -0.439
## [2,] -0.836 1.047 0.244 0.691
## [3,] -0.110 0.244 0.889 0.022
## [4,] -0.439 0.691 0.022 1.336
##
## main 108 ( 120 ) Accepts 18 / 30
## .main 109 ( 120 )
## Mu = 3.626 3.39 -0.893 1.659
## Eta = -0.124 1.492 -0.356
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.994 -0.740 0.064 -0.054
## [2,] -0.740 2.392 -0.101 0.202
## [3,] 0.064 -0.101 1.038 -0.875
## [4,] -0.054 0.202 -0.875 2.041
##
## main 109 ( 120 ) Accepts 12 / 30
## .main 110 ( 120 )
## Mu = 2.963 2.815 -0.708 1.002
## Eta = 0.171 1.652 -0.287
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.878 -0.680 0.380 -0.493
## [2,] -0.680 1.758 -0.521 -0.006
## [3,] 0.380 -0.521 0.708 -0.176
## [4,] -0.493 -0.006 -0.176 2.647
##
## main 110 ( 120 ) Accepts 10 / 30
## .main 111 ( 120 )
## Mu = 2.583 2.983 -0.078 0.607
## Eta = -0.407 1.371 -0.12
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.786 -0.115 0.057 -0.062
## [2,] -0.115 0.725 0.430 0.151
## [3,] 0.057 0.430 1.042 0.203
## [4,] -0.062 0.151 0.203 0.657
##
## main 111 ( 120 ) Accepts 11 / 30
## .main 112 ( 120 )
## Mu = 3.489 2.744 -0.622 0.706
## Eta = -0.388 1.643 -1.179
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.465 -0.707 0.204 -0.265
## [2,] -0.707 1.395 -0.192 -0.418
## [3,] 0.204 -0.192 1.143 0.122
## [4,] -0.265 -0.418 0.122 1.119
##
## main 112 ( 120 ) Accepts 14 / 30
## .main 113 ( 120 )
## Mu = 2.909 2.758 -1.417 0.071
## Eta = -0.144 1.54 -0.56
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.619 -0.078 0.247 -0.285
## [2,] -0.078 1.459 0.231 0.252
## [3,] 0.247 0.231 0.964 -0.362
## [4,] -0.285 0.252 -0.362 2.341
##
## main 113 ( 120 ) Accepts 12 / 30
## .main 114 ( 120 )
## Mu = 3.334 3.46 -0.096 0.763
## Eta = -0.06 1.592 -0.678
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.532 -0.641 0.105 -0.219
## [2,] -0.641 2.345 0.258 1.082
## [3,] 0.105 0.258 0.791 -0.320
## [4,] -0.219 1.082 -0.320 1.738
##
## main 114 ( 120 ) Accepts 15 / 30
## .main 115 ( 120 )
## Mu = 3.045 2.521 -0.953 1.607
## Eta = -0.199 1.668 -0.424
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 0.836 -0.422 0.365 -0.613
## [2,] -0.422 0.633 -0.284 0.193
## [3,] 0.365 -0.284 1.133 -0.196
## [4,] -0.613 0.193 -0.196 1.158
##
## main 115 ( 120 ) Accepts 12 / 30
## .main 116 ( 120 )
## Mu = 3.87 1.098 -0.408 0.765
## Eta = 0 1.54 -0.246
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.246 -1.611 0.025 0.586
## [2,] -1.611 1.698 -0.047 -0.184
## [3,] 0.025 -0.047 0.553 0.073
## [4,] 0.586 -0.184 0.073 1.390
##
## main 116 ( 120 ) Accepts 13 / 30
## .main 117 ( 120 )
## Mu = 2.573 1.918 -0.807 1.77
## Eta = 0.23 1.661 0.028
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.077 -0.675 1.658 -1.565
## [2,] -0.675 1.003 -1.366 1.502
## [3,] 1.658 -1.366 4.111 -3.307
## [4,] -1.565 1.502 -3.307 3.909
##
## main 117 ( 120 ) Accepts 18 / 30
## .main 118 ( 120 )
## Mu = 1.224 2.055 -0.042 0.573
## Eta = -0.26 1.273 -0.073
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 2.628 -1.596 0.197 -2.076
## [2,] -1.596 1.648 -0.333 1.504
## [3,] 0.197 -0.333 0.754 -0.167
## [4,] -2.076 1.504 -0.167 2.456
##
## main 118 ( 120 ) Accepts 13 / 30
## .main 119 ( 120 )
## Mu = 2.941 1.627 0.374 0.335
## Eta = -0.27 1.174 -0.224
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.776 -0.377 0.682 -1.403
## [2,] -0.377 4.625 1.042 0.210
## [3,] 0.682 1.042 1.053 -0.789
## [4,] -1.403 0.210 -0.789 3.609
##
## main 119 ( 120 ) Accepts 15 / 30
## .main 120 ( 120 )
## Mu = 2.703 1.622 -0.148 0.044
## Eta = 0.099 1.348 0.136
## Sigma =
## [,1] [,2] [,3] [,4]
## [1,] 1.849 -0.185 0.308 -0.350
## [2,] -0.185 0.771 0.112 -0.505
## [3,] 0.308 0.112 0.445 -0.441
## [4,] -0.350 -0.505 -0.441 1.441
##
## main 120 ( 120 ) Accepts 17 / 30
## Total duration 27.661 seconds.
fit3
## Note: this summary does not contain a convergence check.
##
## Groups:
## Data1 Data2 Data3
##
## Posterior means and standard deviations for global mean parameters
##
## Total number of runs in the results is 120 .
## Posterior means and standard deviations are averages over 100 MCMC runs (counted after thinning).
##
## Post. Post. cred. cred. p varying Post. cred. cred.
## mean s.d.m. from to s.d. from to
## 1. rate constant IS rate (period 1) 3.6732 ( 1.0260 ) NA NA NA
## 2. rate constant IS rate (period 2) 1.5888 ( 0.6423 ) NA NA NA
## 3. rate constant IS rate (period 4) 2.3249 ( 0.9326 ) NA NA NA
## 4. rate constant IS rate (period 5) 2.6489 ( 0.9927 ) NA NA NA
## 5. rate constant IS rate (period 7) 3.5080 ( 0.8519 ) NA NA NA
## 6. rate constant IS rate (period 8) 2.0390 ( 0.6978 ) NA NA NA
## 7. eval outdegree (density) -0.5876 ( 0.6763 ) -1.9951 0.8253 0.14 + 1.3593 0.6909 2.3919
## 8. eval reciprocity 0.6002 ( 0.8778 ) -1.2934 2.0331 0.82 + 1.5340 0.7893 2.9998
## 9. eval transitive triplets -0.0925 ( 0.3830 ) -0.8541 0.5636 0.42 - NA NA NA
## 10. eval val 1.7497 ( 0.4505 ) 0.7779 2.5944 1.00 - NA NA NA
## 11. eval ae ego -0.3540 ( 0.8198 ) -1.7215 1.2387 0.37 - NA NA NA
##
## Posterior mean of global covariance matrix (varying parameters)
## 2.2293 -1.0589 0.3356 -0.5119
## -1.0589 1.6958 -0.2027 0.2898
## 0.3356 -0.2027 1.8478 -0.3966
## -0.5119 0.2898 -0.3966 2.3531
##
## Posterior standard deviations of elements of global covariance matrix
## 1.5725 0.9424 1.0294 1.1590
## 0.9424 1.4478 1.0486 1.1695
## 1.0294 1.0486 1.5153 1.3712
## 1.1590 1.1695 1.3712 2.4131
RateTracePlots(fit3)
NonRateTracePlots(fit3)
If this is all the data that you have, I would suggest trying to add simple network effects, increase the Markov Chain, but to not have high hopes to ever get good results. Three teams with 5 people is a very small dataset.
We analyzed information exchange in several emergency care teams. These teams were operating in the local simulation center and practicing a specific procedure (ABCDE). All training sessions were recorded and manually coded. A training session had most often 4 team members (main nurse, supporting nurse, doctor, and specialist). The specialist was only called in to transfer the simulated patient from the emergency care room to the care-giving unit. More information about the context is available in The Main Nurse as a Linchpin in Emergency Care Teams.
The variables we collected through coding the videos were information retrieval and information allocation (dependent variables), and three forms of higher order processing of information (summarizing, elaboration, and decision-making). Our coding schema also included exchanges between a human and a machine, when for example, a nurse is working on a machine. Additionally we collected the following variables using a survey: Awareness of team member’s expertise (knowing; independent variable), the importance team member’s attach to each other’s expertise (valuing, independent variable), how adaptive individuals are (adaptive expertise; independent variable), their emotional attachment to their group (social identity; independent variable), and background variables (gender, age, nationality, job role, tenure, number of training session, department; control variable).
We analyzed the data using relational event modeling. For the chapter mentioned above we created some specific scripts to deal with self-loops, valued independent data etc. Below I created a simpler script to demonstrate how to run a REM>
For this workshop we will be focusing
In general, the steps are: 1. Import the data 2. Specify independent, dependent variables 3. Select the effects and specify the model 4. Test goodness of fit
library(relevent)
## Loading required package: trust
## Loading required package: sna
## Loading required package: statnet.common
##
## Attaching package: 'statnet.common'
## The following object is masked from 'package:base':
##
## order
## Loading required package: network
## network: Classes for Relational Data
## Version 1.13.0 created on 2015-08-31.
## copyright (c) 2005, Carter T. Butts, University of California-Irvine
## Mark S. Handcock, University of California -- Los Angeles
## David R. Hunter, Penn State University
## Martina Morris, University of Washington
## Skye Bender-deMoll, University of Washington
## For citation information, type citation("network").
## Type help("network-package") to get started.
## sna: Tools for Social Network Analysis
## Version 2.4 created on 2016-07-23.
## copyright (c) 2005, Carter T. Butts, University of California-Irvine
## For citation information, type citation("sna").
## Type help(package="sna") to get started.
## Loading required package: coda
## relevent: Relational Event Models
## Version 1.0-4 created on March 9, 2015.
## copyright (c) 2007, Carter T. Butts, University of California-
## Irvine
## For citation information, type citation("relevent").
## Type help(package="relevent") to get started.
library(informR)
## Loading required package: abind
## informR: Sequence Statistics for Relational Event Models
## Version 1.0-5 created on 2015-03-09.
## copyright (c) 2010, Christopher Steven Marcum, University of California-
## Irvine
## For citation information, type citation("informR").
## Type help(package="informR") to get started.
source("rem_data_loading.R", echo=F)
rem can be applied to egocentric relational event data but requires that the user supplies the necessary statistics. On the other hand, rem.dyad is less flexible, but has more built-in functionalities (and hence requires less coding). The function takes the form of rem.dyad(edgelist, n, effects = NULL, ordinal = TRUE. To run it, you need to define an edgelist, the number of senders and receivers, an optional list of effects, and indicate if the timing is ordinal (TRUE) or if the exact timing of events should be used (ordinal=FALSE). The edgelist is a 3-column matrix which contains information about the timing, sender, and receiver. The data needs to be sorted by time.
nbr_send_rec = c(unique(remj[remj$Observation == 10,2]), unique(remj[remj$Observation == 10,(3)]))
nbr_send_rec
## [1] 10 8 1 5 2 6 3 4
fit1 <- rem.dyad(remj[remj$Observation == 10,(1:3)], n = length(nbr_send_rec), ordinal=FALSE)
summary(fit1)
## Relational Event Model (Temporal Likelihood)
##
## Null model object.
##
## Null deviance: 3124.23 on 255 degrees of freedom
## Residual deviance: 3124.23 on 255 degrees of freedom
## Chi-square: 0 on 0 degrees of freedom, asymptotic p-value 1
## AIC: 3126.23 AICC: 3124.245 BIC: 3129.771
The model fit1 only includes the fixed effect. Not interesting at all. We are going to add a bunch of effects.
fit2 <- rem.dyad(remj[remj$Observation == 10,(1:3)], n = length(nbr_send_rec), ordinal=FALSE, effects= c("FESnd","FERec", "PSAB-BA", "PSAB-XA"))
## Computing preliminary statistics
## Fitting model
## Obtaining goodness-of-fit statistics
summary(fit2)
## Relational Event Model (Temporal Likelihood)
##
## Estimate
## FESnd.2 -1.2756
## FESnd.3 -13.2561
## FESnd.4 -13.2561
## FESnd.5 -13.2807
## FESnd.6 -13.2772
## FESnd.7 -13.2687
## FESnd.8 -13.2810
## FERec.2 -2.3792
## FERec.3 -3.0380
## FERec.4 -2.6255
## FERec.5 -4.4902
## FERec.6 -3.4224
## FERec.7 -3.7970
## FERec.8 -13.2607
## PSAB-BA 0.0000
## PSAB-XA 0.0000
## Null deviance: 3124.23 on 255 degrees of freedom
## Residual deviance: 3065.266 on 240 degrees of freedom
## Chi-square: 58.96386 on 15 degrees of freedom, asymptotic p-value 3.797506e-07
## AIC: 3097.266 AICC: 3099.552 BIC: 3153.926
In my analysis I also wanted to take the type of event into account. Hence, I wanted to make a difference between information allocation, information retrieval, summarizing, elaboration, and decision making. I also had individual variables I wanted to include. For these reasons I used rem.
The function rem requires a different set of arguments rem(eventlist, statslist, supplist = NULL, timing = c("ordinal", "interval"). The first, eventlist is a 2-column matrix (or list) with the time of an event and the event type. This is the file evlj. If you inspect its type (class(evlj)) and its structure (str(evlj)), you’ll see that it is a list with 31 items. Each item in the list is a matrix with 2 columns. The first column in the matrix is a series of numbers, the event types, the second column contains the timing.
evlj$eventlist$`1`[1:10,]
## [,1] [,2]
## [1,] 0 0.00001
## [2,] 11 19.95292
## [3,] 12 22.45043
## [4,] 11 23.99704
## [5,] 5 29.57855
## [6,] 9 32.31916
## [7,] 1 34.75897
## [8,] 6 34.95038
## [9,] 2 36.16269
## [10,] 1 37.26560
evlj$event.key
## id event.type
## [1,] "a" "8.8"
## [2,] "b" "1.5"
## [3,] "c" "5.1"
## [4,] "d" "2.1"
## [5,] "e" "1.2"
## [6,] "f" "1.10"
## [7,] "g" "2.6"
## [8,] "h" "1.6"
## [9,] "i" "6.1"
## [10,] "j" "5.10"
## [11,] "k" "6.2"
## [12,] "l" "2.5"
## [13,] "m" "5.2"
## [14,] "n" "1.3"
## [15,] "o" "2.10"
## [16,] "p" "3.10"
## [17,] "q" "3.6"
## [18,] "r" "2.3"
## [19,] "s" "6.3"
## [20,] "t" "3.2"
## [21,] "u" "3.5"
## [22,] "v" "5.3"
## [23,] "w" "3.1"
## [24,] "x" "4.10"
## [25,] "y" "3.4"
## [26,] "z" "4.3"
## [27,] "A" "4.6"
## [28,] "B" "6.4"
## [29,] "C" "4.5"
## [30,] "D" "5.4"
## [31,] "E" "9.9"
## [32,] "F" "7.7"
## [33,] "G" "2.4"
## [34,] "H" "4.2"
## [35,] "I" "4.1"
## [36,] "J" "1.4"
This list was created by calling gen.evl(eventlist, null.events=NULL). Eventlist is a 2 or 3 column matrix. Running gen.evl gives you an eventlist (a sequence of numbers indicating the events that occurred) and an event.key.
The function rem also requires that you provide a statslist. This is a file containing some statistics about your data. The code below creates such as statslist for the fixed sender effects. Think of these as your intercepts only for sending information.
#Intercepts et cetera
evlj.ints <- gen.intercepts(evlj, contr = F)
nj<-7
njn<-c(1,2,3,4,5,6,10)
sformlistj <- c(
lapply(2:(nj-1), function(z){
str <- paste("^",njn[z], ".", sep="")
grep(str, evlj$event.key[ ,2])
# put in the square brackets, all events which are between real people.
# the 2 stands for the event.key not event.id
}),
lapply(2:nj, function(z){
str <- paste(".", njn[z],"$", sep = "")
grep(str, evlj$event.key[, 2])
})
)
b1j<-list()
b1.lj<-list()
FEsj<-list()
for(h in 1:length(evlj$eventlist)){
b1j[[h]] <- lapply(sformlistj, function(x) evlj.ints[[h]][[1]][, , evlj$event.key[x,2]])
b1.lj[[h]] <- lapply(b1j[[h]], apply, MARGIN = 1:2, sum)
FEsj[[h]] <- array(unlist(b1.lj[[h]]), dim = c(nrow(b1.lj[[h]][[1]]), ncol(b1.lj[[h]][[1]]),
length(b1.lj[[h]])))
dimnames(FEsj[[h]]) <- list(dimnames(b1j[[h]][[1]])[[1]], dimnames(b1j[[h]][[1]])[[2]],
c(paste("FESnd", njn[-c(1,7)], sep="."),paste("FERec", njn[-1], sep=".")))
}
#Simple Fixed Effects for Sender and Receiver
FEsj<-sfl2statslist(FEsj)
Now we have the statslist. The supplist has been created when loading the data. The goal of the supplist is to indicate which events could have been observed and which not. For example, in my setting the doctor entered the emergency care room at a later stage. This means that it was impossible to observe any interaction with the doctor before that. My event list contains an event ‘doctor enters the room’ (aka handover between nurse and doctor). We used this event to indicate when interaction with the doctor was possible.
fit1.rem is running a simple fixed effect model. This is the null model only including intercepts.
#Model 1 Fixed Effects for Sender and Receiver (pooled likelihood)
fit1.rem<-rem(evlj$eventlist,FEsj,timing="interval",estimator="MLE",supplist=supplistj)
summary(fit1.rem)
## Egocentric Relational Event Model (Interval Likelihood)
##
## MLE Std.Err Z value Pr(>|z|)
## FESnd.2 -2.737658 0.015226 -179.80 < 2.2e-16 ***
## FESnd.3 -2.591566 0.014188 -182.66 < 2.2e-16 ***
## FESnd.4 -4.284953 0.032379 -132.34 < 2.2e-16 ***
## FESnd.5 -3.481403 0.022142 -157.23 < 2.2e-16 ***
## FESnd.6 -3.902952 0.028064 -139.07 < 2.2e-16 ***
## FERec.2 -3.016525 0.017835 -169.13 < 2.2e-16 ***
## FERec.3 -2.930825 0.017165 -170.75 < 2.2e-16 ***
## FERec.4 -4.531038 0.037141 -121.99 < 2.2e-16 ***
## FERec.5 -3.185861 0.019290 -165.15 < 2.2e-16 ***
## FERec.6 -3.938522 0.028070 -140.31 < 2.2e-16 ***
## FERec.10 -2.770828 0.015499 -178.78 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Null deviance: 106703.6 on 9557 degrees of freedom
## Residual deviance: 116213.4 on 9546 degrees of freedom
## Chi-square: -9509.75 on 11 degrees of freedom, asymptotic p-value 1
## AIC: 116235.4 AICC: 116235.4 BIC: 116314.2
Now we will be including a participation shift event. 10 is a special ‘ego actor’: The team. When team members engaged in exchanges such as summarizing information, elaboration of information, and decision-making it was difficult to decide who the receiver of this information exchange is. Therefore, we coded them all to be directed at the team (actor 10). For this reason, actor 10 cannot send out information exchanges.
#Ignore null events and events involving 10, who cannot by construct reply.
nevs<-grep(paste(c(paste("(",evlj$null.events,")",sep=""),"(10)"),collapse="|"),evlj$event.key[,2])
evk.ex<-cbind(evlj$event.key[-nevs,1],do.call("rbind",strsplit(evlj$event.key[-nevs,2],"\\.")))
#Match AB->BA turn taking PShifts
tr1<-cbind(evk.ex[,1],evk.ex[sapply(paste(evk.ex[,2],evk.ex[,3],sep="."),function(x) which(x==paste(evk.ex[,3],evk.ex[,2],sep="."))),1])
tr2<-paste(tr1[,1],tr1[,2],sep="")
tr.sfl<-glb.sformlist(evlj,sforms=list(tr2),new.names="PS-ABBA",interval=TRUE,cond=FALSE)
FEsTr<-slbind(tr.sfl,FEsj)
#FEsTr<-slbind(tr.sfl,KWSnd1)
fit2.rem <- rem(evlj$eventlist, FEsTr, supplist=supplistj,estimator = "MLE",timing="interval")
summary(fit2.rem)
## Egocentric Relational Event Model (Interval Likelihood)
##
## MLE Std.Err Z value Pr(>|z|)
## FESnd.2 -3.050740 0.015931 -191.49 < 2.2e-16 ***
## FESnd.3 -2.848682 0.014727 -193.44 < 2.2e-16 ***
## FESnd.4 -4.288418 0.032372 -132.47 < 2.2e-16 ***
## FESnd.5 -3.666170 0.022332 -164.17 < 2.2e-16 ***
## FESnd.6 -4.044053 0.028155 -143.64 < 2.2e-16 ***
## FERec.2 -3.302272 0.018360 -179.86 < 2.2e-16 ***
## FERec.3 -3.114472 0.017412 -178.87 < 2.2e-16 ***
## FERec.4 -4.515115 0.037135 -121.59 < 2.2e-16 ***
## FERec.5 -3.322871 0.019414 -171.16 < 2.2e-16 ***
## FERec.6 -4.047708 0.028122 -143.93 < 2.2e-16 ***
## FERec.10 -2.736799 0.015484 -176.75 < 2.2e-16 ***
## PS-ABBA 1.934131 0.015255 126.79 < 2.2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Null deviance: 106703.6 on 9557 degrees of freedom
## Residual deviance: 110630.8 on 9545 degrees of freedom
## Chi-square: -3927.161 on 12 degrees of freedom, asymptotic p-value 1
## AIC: 110654.8 AICC: 110654.8 BIC: 110740.8
A quick note about the interpretation of the results. The estimates are hazard rates. You could take the exponential of them (exp(-2.85)) to get log values. In that way, you can say thinks like “the likelihood that the doctor (actor 3) will send information is 95 per cent (exp(-2.85) less likely than that the main nurse will send information”. Why the main nurse? You have to specify a base level. We picked the main nurse as this actor initiates the interaction. However, we could have also picked someone else. The danger with using log likelihoods when discussing your results is that others might not view it as a longitudinal study. An alternative is to talk about hazard rates. You would then say something like “The rate at which the doctor sends information is 95 % less fast than the rate of sending information from the main nurse.”