save(socdef_df, file="/Users/anuschka/Documents/labjournal/data/socdef_df.RData")
#dependent
snet <- sienaDependent(soc_net_array)
### Step 1: define data
#gender
gender <- as.numeric(socdef_df$gender=="female")
gender <- coCovar(gender)
#Kardashian Index
#ki <- as.numeric(socdef_df$ki)
#ki <- coCovar(ki)
#Ethnicity
dutch <- as.numeric(socdef_df$dutch)
dutch <- coCovar(dutch)
#Twitter dummy as control variable
twitter_dum <- (socdef_df$twitter_dum)
twitter_dum <- coCovar(twitter_dum)
#Twitter followercount
followers <- as.numeric(socdef_df$followers)
followers <- coCovar(followers)
#year first pub
# soc_staff_cit %>% group_by(gs_id) %>%
# mutate(pub_first = min(year)) %>%
# select(c("gs_id", "pub_first")) %>%
# distinct(gs_id, pub_first, .keep_all = TRUE) -> firstpub_df
#
# socdef_df <- left_join(socdef_df, firstpub_df)
#
# #if no publication yet, set pub_first op 2023
# socdef_df %>% mutate(pub_first = replace_na(pub_first, 2023)) -> socdef_df
pub_first <- coCovar(socdef_df$pub_first)
mydata <- sienaDataCreate(snet, gender, dutch, pub_first, twitter_dum, followers)
### Step 2: create effects structure
myeffs <- getEffects(mydata)
effectsDocumentation(myeffs)
### Step 3: get initial description
print01Report(mydata, modelname = "/Users/anuschka/Documents/labjournal/results/soc_report_twit")
### Step4: specify model with structural effects
myeffs <- includeEffects(myeffs, degPlus) #some publish a lot, some not. (interpretation: talent/luck? )
myeffs <- includeEffects(myeffs, transTriads)
myeffs <- includeEffects(myeffs, absDiffX, interaction1 = "followers")
### Step5 estimate
myAlgorithm <- sienaAlgorithmCreate(projname = "soc_report_twit")
(ans <- siena07(myAlgorithm, data = mydata, effects = myeffs))
# (the outer parentheses lead to printing the obtained result on the screen) if necessary, estimate
# further
(ans <- siena07(myAlgorithm, data = mydata, effects = myeffs, prevAns = ans))
#Save the last model since it has the lowest maximum convergence ratio.
save(ans, file="/Users/anuschka/Documents/labjournal/results/soc_model_struc_twit")
#> Estimates, standard errors and convergence t-ratios
#>
#> Estimate Standard Convergence
#> Error t-ratio
#>
#> Rate parameters:
#> 0.1 Rate parameter period 1 1.5523 ( 0.4264 )
#> 0.2 Rate parameter period 2 2.4902 ( 0.7085 )
#>
#> Other parameters:
#> 1. eval degree (density) -2.7680 ( 0.3799 ) 0.0517
#> 2. eval transitive triads 0.5974 ( 0.2531 ) -0.0132
#> 3. eval degree act+pop 0.0899 ( 0.0382 ) 0.0192
#> 4. eval followers abs. difference 0.0002 ( 0.0002 ) 0.0324
#>
#> Overall maximum convergence ratio: 0.1159
#>
#>
#> Total of 2496 iteration steps.
#>
#> Covariance matrix of estimates (correlations below diagonal)
#>
#> 0.144 0.025 -0.012 0.000
#> 0.262 0.064 -0.006 0.000
#> -0.842 -0.628 0.001 0.000
#> -0.332 0.001 0.092 0.000
#>
#> Derivative matrix of expected statistics X by parameters:
#>
#> 74.829 56.534 2327.748 61601.966
#> 56.563 74.738 2113.136 46002.509
#> 858.691 800.121 30546.116 678027.382
#> 32874.337 24052.368 973634.455 71698108.953
#>
#> Covariance matrix of X (correlations below diagonal):
#>
#> 1.019690e+02 8.947000e+01 3.349854e+03 8.872810e+04
#> 8.190000e-01 1.170820e+02 3.414132e+03 7.943304e+04
#> 9.470000e-01 9.010000e-01 1.225888e+05 2.838908e+06
#> 6.830000e-01 5.710000e-01 6.300000e-01 1.654947e+08
Similar effect bc of course we did not add the covariates yet. All structural effects are significant.
myeffs1 <- getEffects(mydata)
myeffs1 <- includeEffects(myeffs1, degPlus)
myeffs1 <- includeEffects(myeffs1, transTriads)
myeffs1 <- includeEffects(myeffs1, absDiffX, interaction1 = "followers")
myeffs1 <- includeEffects(myeffs1, sameX, interaction1 = "dutch")
myeffs1 <- includeEffects(myeffs1, absDiffX, interaction1 = "pub_first")
#myeffs1 <- includeEffects(myeffs1, sameX, interaction1 = "twitter_dum")
myeffs1 <- includeEffects(myeffs1, sameX, interaction1 = "gender")
(ans1 <- siena07(myAlgorithm, data = mydata, effects = myeffs1, prevAns = ans))
#Save the last model since it has the lowest maximum convergence ratio.
save(ans1, file="/Users/anuschka/Documents/labjournal/results/soc_model_cov1_twit")
#> Estimates, standard errors and convergence t-ratios
#>
#> Estimate Standard Convergence
#> Error t-ratio
#>
#> Rate parameters:
#> 0.1 Rate parameter period 1 1.5922 ( 0.4546 )
#> 0.2 Rate parameter period 2 2.5406 ( 0.6931 )
#>
#> Other parameters:
#> 1. eval degree (density) -3.0969 ( 0.5756 ) -0.0011
#> 2. eval transitive triads 0.6016 ( 0.2678 ) 0.0278
#> 3. eval degree act+pop 0.0952 ( 0.0422 ) 0.0045
#> 4. eval same gender -0.0649 ( 0.2591 ) -0.0009
#> 5. eval same dutch 0.2363 ( 0.3407 ) -0.0142
#> 6. eval pub_first abs. difference 0.0112 ( 0.0187 ) 0.0098
#> 7. eval followers abs. difference 0.0002 ( 0.0002 ) -0.0251
#>
#> Overall maximum convergence ratio: 0.0886
#>
#>
#> Total of 2552 iteration steps.
#>
#> Covariance matrix of estimates (correlations below diagonal)
#>
#> 0.331 0.036 -0.017 -0.026 -0.133 -0.003 0.000
#> 0.235 0.072 -0.007 -0.001 -0.019 0.001 0.000
#> -0.694 -0.623 0.002 -0.001 0.005 0.000 0.000
#> -0.171 -0.020 -0.066 0.067 0.002 0.001 0.000
#> -0.676 -0.211 0.365 0.018 0.116 0.000 0.000
#> -0.325 0.175 -0.163 0.121 0.037 0.000 0.000
#> -0.281 0.050 0.045 -0.035 0.091 0.150 0.000
#>
#> Derivative matrix of expected statistics X by parameters:
#>
#> 75.393 54.940 2327.248 72.590 102.251 1593.519 56706.914
#> 57.019 72.610 2102.094 58.155 80.422 1158.604 41734.819
#> 865.427 771.476 30363.712 844.537 1122.169 18694.872 640384.632
#> 32.865 25.347 1016.528 59.454 44.546 632.912 28798.710
#> 54.505 39.346 1591.890 52.614 94.303 1107.422 40138.363
#> 795.335 586.434 25552.691 701.190 1047.813 22087.280 524447.281
#> 31789.567 21456.392 937879.704 33622.457 42047.397 598886.797 72574615.150
#>
#> Covariance matrix of X (correlations below diagonal):
#>
#> 1.203200e+02 1.061660e+02 3.988914e+03 1.193750e+02 1.664840e+02 2.539889e+03 9.208920e+04
#> 8.390000e-01 1.331870e+02 4.003745e+03 1.073590e+02 1.502070e+02 2.248103e+03 8.146286e+04
#> 9.560000e-01 9.120000e-01 1.446818e+05 3.917482e+03 5.372742e+03 8.628509e+04 3.015680e+06
#> 8.370000e-01 7.150000e-01 7.920000e-01 1.691130e+02 1.671320e+02 2.377767e+03 1.013753e+05
#> 9.200000e-01 7.890000e-01 8.560000e-01 7.790000e-01 2.719810e+02 3.423169e+03 1.281729e+05
#> 9.250000e-01 7.780000e-01 9.070000e-01 7.310000e-01 8.300000e-01 6.261579e+04 1.810544e+06
#> 6.540000e-01 5.500000e-01 6.180000e-01 6.080000e-01 6.060000e-01 5.640000e-01 1.646616e+08
myeffs2 <- getEffects(mydata)
myeffs2 <- includeEffects(myeffs2, degPlus)
myeffs2 <- includeEffects(myeffs2, transTriads)
myeffs2 <- includeEffects(myeffs2, altX, interaction1 = "followers")
myeffs2 <- includeEffects(myeffs2, sameX, interaction1 = "dutch")
myeffs2 <- includeEffects(myeffs2, absDiffX, interaction1 = "pub_first")
#myeffs2 <- includeEffects(myeffs2, sameX, interaction1 = "twitter_dum")
myeffs2 <- includeEffects(myeffs2, sameX, interaction1 = "gender")
(ans2 <- siena07(myAlgorithm, data = mydata, effects = myeffs2, prevAns = ans1))
#Save the last model since it has the lowest maximum convergence ratio.
save(ans2, file="/Users/anuschka/Documents/labjournal/results/soc_model_cov2_twit")
#> Estimates, standard errors and convergence t-ratios
#>
#> Estimate Standard Convergence
#> Error t-ratio
#>
#> Rate parameters:
#> 0.1 Rate parameter period 1 1.5836 ( 0.4446 )
#> 0.2 Rate parameter period 2 2.4934 ( 0.7225 )
#>
#> Other parameters:
#> 1. eval degree (density) -3.0943 ( 0.5877 ) 0.0812
#> 2. eval transitive triads 0.5839 ( 0.2708 ) 0.0777
#> 3. eval degree act+pop 0.1003 ( 0.0427 ) 0.0808
#> 4. eval same gender -0.0550 ( 0.2561 ) 0.0638
#> 5. eval same dutch 0.2676 ( 0.3455 ) 0.0843
#> 6. eval pub_first abs. difference 0.0143 ( 0.0201 ) 0.0738
#> 7. eval followers alter 0.0004 ( 0.0003 ) 0.0013
#>
#> Overall maximum convergence ratio: 0.0881
#>
#>
#> Total of 2750 iteration steps.
#>
#> Covariance matrix of estimates (correlations below diagonal)
#>
#> 0.345 0.041 -0.018 -0.032 -0.132 -0.005 0.000
#> 0.259 0.073 -0.007 -0.003 -0.027 0.001 0.000
#> -0.713 -0.610 0.002 0.000 0.005 0.000 0.000
#> -0.211 -0.039 -0.041 0.066 0.002 0.001 0.000
#> -0.652 -0.290 0.357 0.019 0.119 0.000 0.000
#> -0.384 0.129 -0.081 0.132 0.057 0.000 0.000
#> -0.221 0.091 0.057 0.004 0.020 0.330 0.000
#>
#> Derivative matrix of expected statistics X by parameters:
#>
#> 73.755 56.723 2273.134 74.653 103.747 1501.381 -4582.017
#> 57.793 73.478 2110.739 63.145 83.949 1128.141 -4634.246
#> 837.234 767.043 29297.561 865.045 1126.664 17316.134 -66442.202
#> 35.615 29.843 1123.049 63.654 49.941 670.470 533.056
#> 55.374 43.214 1632.926 55.676 98.863 1078.684 -2649.541
#> 725.122 538.161 22614.073 680.713 981.912 20052.859 -123637.683
#> 4351.323 2103.656 102729.284 5811.749 6801.602 -19447.777 21159065.778
#>
#> Covariance matrix of X (correlations below diagonal):
#>
#> 113.680 100.012 3694.905 118.948 160.725 2262.289 -4852.812
#> 0.841 124.304 3709.183 110.725 141.890 1947.076 -3070.529
#> 0.951 0.913 132684.027 3911.455 5059.158 74377.015 -163485.060
#> 0.848 0.755 0.816 173.156 167.676 2268.632 974.241
#> 0.914 0.771 0.842 0.772 272.120 3092.556 -4878.885
#> 0.907 0.746 0.873 0.737 0.801 54741.251 -224160.575
#> -0.077 -0.047 -0.076 0.013 -0.050 -0.163 34697137.157
rm(list=ls())
save(datadef_df, file="/Users/anuschka/Documents/labjournal/data/datadef_df.RData")
#dependent
dnet <- sienaDependent(dnet_array)
### Step 1: define data
#gender
gender <- as.numeric(datadef_df$gender=="female")
gender <- coCovar(gender)
#Kardashian Index
#ki <- as.numeric(datadef_df$ki)
#ki <- coCovar(ki)
#Ethnicity
dutch <- as.numeric(datadef_df$dutch)
dutch <- coCovar(dutch)
#Twitter dummy as control variable
twitter_dum <- (datadef_df$twitter_dum)
twitter_dum <- coCovar(twitter_dum)
#Twitter followers
followers <- as.numeric(datadef_df$followers)
followers <- coCovar(followers)
# #year first pub
# data_staff_cit %>% group_by(gs_id) %>%
# mutate(pub_first = min(year)) %>%
# select(c("gs_id", "pub_first")) %>%
# distinct(gs_id, pub_first, .keep_all = TRUE) -> firstpub_df1
#
# datadef_df <- left_join(datadef_df, firstpub_df1)
#
# #if no publication yet, set pub_first op 2023
# datadef_df %>% mutate(pub_first = replace_na(pub_first, 2023)) -> datadef_df
pub_first <- coCovar(datadef_df$pub_first)
mydata <- sienaDataCreate(dnet, gender, followers, dutch, pub_first, twitter_dum)
### Step 2: create effects structure
myeff <- getEffects(mydata)
effectsDocumentation(myeff)
### Step 3: get initial description
print01Report(mydata, modelname = "/Users/anuschka/Documents/labjournal/results/data_report_twit")
### Step4: specify model
myeff <- includeEffects(myeff, degPlus)
myeff <- includeEffects(myeff, transTriads)
myeff <- includeEffects(myeff, absDiffX, interaction1 = "followers")
### Step5 estimate
myAlgorithm <- sienaAlgorithmCreate(projname = "data_report_twit")
(ans <- siena07(myAlgorithm, data = mydata, effects = myeff))
# (the outer parentheses lead to printing the obtained result on the screen) if necessary, estimate
# further
#(ans <- siena07(myAlgorithm, data = mydata, effects = myeff, prevAns = ans))
save(ans, file="/Users/anuschka/Documents/labjournal/results/data_model_struc_twit")
#> Estimates, standard errors and convergence t-ratios
#>
#> Estimate Standard Convergence
#> Error t-ratio
#>
#> Rate parameters:
#> 0.1 Rate parameter period 1 1.5924 ( 0.4342 )
#> 0.2 Rate parameter period 2 3.0146 ( 0.6705 )
#>
#> Other parameters:
#> 1. eval degree (density) -2.3438 ( 0.3280 ) 0.0187
#> 2. eval transitive triads 1.2607 ( 0.2165 ) 0.0033
#> 3. eval degree act+pop 0.0329 ( 0.0338 ) 0.0064
#> 4. eval followers abs. difference 0.0000 ( 0.0001 ) 0.0410
#>
#> Overall maximum convergence ratio: 0.0486
#>
#>
#> Total of 2012 iteration steps.
#>
#> Covariance matrix of estimates (correlations below diagonal)
#>
#> 0.108 0.004 -0.009 0.000
#> 0.063 0.047 -0.003 0.000
#> -0.854 -0.397 0.001 0.000
#> -0.352 -0.011 0.143 0.000
#>
#> Derivative matrix of expected statistics X by parameters:
#>
#> 8.133700e+01 4.866900e+01 2.294112e+03 7.104186e+04
#> 6.806500e+01 1.252330e+02 2.856483e+03 6.124563e+04
#> 8.908750e+02 8.827480e+02 3.288545e+04 7.442331e+05
#> 3.758213e+04 2.203888e+04 9.908670e+05 1.392190e+08
#>
#> Covariance matrix of X (correlations below diagonal):
#>
#> 1.338790e+02 1.878760e+02 5.266452e+03 1.216372e+05
#> 7.410000e-01 4.795450e+02 1.012903e+04 1.894994e+05
#> 8.970000e-01 9.110000e-01 2.576368e+05 4.960728e+06
#> 5.550000e-01 4.570000e-01 5.160000e-01 3.584187e+08
myeffd1 <- getEffects(mydata)
myeffd1 <- includeEffects(myeffd1, degPlus) #some publish a lot, some not. (interpretation: talent/luck? )
myeffd1 <- includeEffects(myeffd1, transTriads)
myeffd1 <- includeEffects(myeffd1, absDiffX, interaction1 = "followers")
myeffd1 <- includeEffects(myeffd1, sameX, interaction1 = "dutch")
myeffd1 <- includeEffects(myeffd1, absDiffX, interaction1 = "pub_first")
#myeffd1 <- includeEffects(myeffd1, sameX, interaction1 = "twitter_dum")
myeffd1 <- includeEffects(myeffd1, sameX, interaction1 = "gender")
(ansd1 <- siena07(myAlgorithm, data = mydata, effects = myeffd1, prevAns = ans))
#Save the last model since it has the lowest maximum convergence ratio.
save(ansd1, file="/Users/anuschka/Documents/labjournal/results/data_model_cov1_twit")
#> Estimates, standard errors and convergence t-ratios
#>
#> Estimate Standard Convergence
#> Error t-ratio
#>
#> Rate parameters:
#> 0.1 Rate parameter period 1 1.5968 ( 0.4346 )
#> 0.2 Rate parameter period 2 2.9903 ( 0.6729 )
#>
#> Other parameters:
#> 1. eval degree (density) -2.1508 ( 0.3814 ) 0.0310
#> 2. eval transitive triads 1.2449 ( 0.2162 ) -0.0318
#> 3. eval degree act+pop 0.0366 ( 0.0341 ) 0.0039
#> 4. eval same gender -0.0450 ( 0.2118 ) 0.0312
#> 5. eval followers abs. difference 0.0000 ( 0.0002 ) -0.0214
#> 6. eval same dutch -0.0517 ( 0.2003 ) 0.0413
#> 7. eval pub_first abs. difference -0.0152 ( 0.0119 ) 0.0198
#>
#> Overall maximum convergence ratio: 0.1006
#>
#>
#> Total of 2389 iteration steps.
#>
#> Covariance matrix of estimates (correlations below diagonal)
#>
#> 0.145 0.002 -0.009 -0.022 0.000 -0.022 -0.001
#> 0.026 0.047 -0.003 0.003 0.000 0.001 0.000
#> -0.725 -0.373 0.001 0.000 0.000 0.000 0.000
#> -0.276 0.055 -0.063 0.045 0.000 -0.004 0.000
#> -0.324 0.088 0.074 0.004 0.000 0.000 0.000
#> -0.283 0.025 0.037 -0.089 0.012 0.040 0.000
#> -0.219 -0.111 -0.049 0.028 0.083 -0.097 0.000
#>
#> Derivative matrix of expected statistics X by parameters:
#>
#> 8.466500e+01 5.091200e+01 2.425062e+03 9.903300e+01 8.136578e+04 9.630800e+01 1.682442e+03
#> 6.940000e+01 1.282500e+02 2.938579e+03 8.369600e+01 6.648115e+04 7.787400e+01 1.536368e+03
#> 9.133740e+02 8.873710e+02 3.370918e+04 1.077350e+03 8.577978e+05 1.028735e+03 1.908679e+04
#> 5.118200e+01 3.307600e+01 1.495108e+03 1.063810e+02 4.890596e+04 6.239200e+01 1.006226e+03
#> 3.744450e+04 1.845711e+04 9.835460e+05 4.466568e+04 1.381984e+08 4.098145e+04 6.683628e+05
#> 4.792000e+01 2.735500e+01 1.374125e+03 6.235300e+01 4.714052e+04 9.926200e+01 9.869880e+02
#> 8.312970e+02 5.863450e+02 2.531296e+04 9.515030e+02 7.390169e+05 9.938940e+02 2.989596e+04
#>
#> Covariance matrix of X (correlations below diagonal):
#>
#> 1.317890e+02 1.832150e+02 5.147083e+03 1.596940e+02 1.263302e+05 1.493700e+02 2.741700e+03
#> 7.230000e-01 4.875590e+02 1.008829e+04 2.362960e+02 2.046990e+05 2.066350e+02 4.059730e+03
#> 8.900000e-01 9.070000e-01 2.539187e+05 6.332508e+03 5.223704e+06 5.849738e+03 1.119591e+05
#> 8.160000e-01 6.280000e-01 7.380000e-01 2.903430e+02 1.567869e+05 1.932550e+02 3.290856e+03
#> 5.650000e-01 4.760000e-01 5.330000e-01 4.730000e-01 3.786976e+08 1.429655e+05 2.619945e+06
#> 8.260000e-01 5.940000e-01 7.370000e-01 7.200000e-01 4.660000e-01 2.482060e+02 3.133068e+03
#> 8.380000e-01 6.450000e-01 7.790000e-01 6.770000e-01 4.720000e-01 6.970000e-01 8.130003e+04
myeffd2a <- getEffects(mydata)
myeffd2a <- includeEffects(myeffd2a, degPlus)
myeffd2a <- includeEffects(myeffd2a, transTriads)
myeffd2a <- includeEffects(myeffd2a, altX, interaction1 = "followers")
(ansd2a <- siena07(myAlgorithm, data = mydata, effects = myeffd2, prevAns = ansd1))
#Save the last model since it has the lowest maximum convergence ratio.
save(ansd2a, file="/Users/anuschka/Documents/labjournal/results/data_model_cov2a_twit")
#> Estimates, standard errors and convergence t-ratios
#>
#> Estimate Standard Convergence
#> Error t-ratio
#>
#> Rate parameters:
#> 0.1 Rate parameter period 1 1.5839 ( 0.4501 )
#> 0.2 Rate parameter period 2 3.0342 ( 0.6894 )
#>
#> Other parameters:
#> 1. eval degree (density) -2.1672 ( 0.3634 ) -0.0302
#> 2. eval transitive triads 1.2493 ( 0.2045 ) -0.0728
#> 3. eval degree act+pop 0.0364 ( 0.0338 ) -0.0589
#> 4. eval same gender -0.0479 ( 0.2018 ) -0.0240
#> 5. eval followers alter 0.0001 ( 0.0002 ) 0.0400
#> 6. eval same dutch -0.0512 ( 0.2106 ) -0.0042
#> 7. eval pub_first abs. difference -0.0149 ( 0.0129 ) -0.0224
#>
#> Overall maximum convergence ratio: 0.1002
#>
#>
#> Total of 2550 iteration steps.
#>
#> Covariance matrix of estimates (correlations below diagonal)
#>
#> 0.132 0.005 -0.009 -0.018 0.000 -0.024 -0.001
#> 0.062 0.042 -0.002 -0.002 0.000 0.002 0.000
#> -0.731 -0.352 0.001 0.000 0.000 0.000 0.000
#> -0.247 -0.040 -0.047 0.041 0.000 -0.006 0.000
#> 0.092 -0.043 -0.021 0.008 0.000 0.000 0.000
#> -0.309 0.041 0.003 -0.130 -0.152 0.044 0.000
#> -0.242 -0.094 -0.105 0.022 0.012 -0.016 0.000
#>
#> Derivative matrix of expected statistics X by parameters:
#>
#> 96.531 65.789 2839.712 112.867 -4842.483 110.775 1965.492
#> 77.118 142.962 3251.003 96.731 2215.733 87.019 1722.012
#> 1030.492 1013.667 37502.201 1223.689 -37335.738 1167.769 21929.612
#> 59.222 46.474 1805.745 117.852 -2814.642 73.933 1221.061
#> -1194.085 -2509.622 -67897.343 -2850.939 46620940.978 4265.552 -41353.423
#> 55.536 37.332 1614.020 70.144 283.875 108.627 1142.546
#> 1011.237 824.404 31397.759 1168.527 -75090.257 1177.215 32379.889
#>
#> Covariance matrix of X (correlations below diagonal):
#>
#> 149.657 201.565 5702.601 179.999 -820.434 168.054 3161.682
#> 0.727 513.089 10646.119 262.786 1762.386 225.856 4598.609
#> 0.898 0.906 269378.473 7033.376 -55771.999 6317.264 125009.746
#> 0.834 0.658 0.768 311.300 -4753.790 212.387 3819.499
#> -0.007 0.008 -0.011 -0.027 99222419.672 3133.059 -100343.441
#> 0.829 0.602 0.734 0.726 0.019 274.634 3593.342
#> 0.865 0.680 0.806 0.725 -0.034 0.726 89196.126
myeffd2 <- getEffects(mydata)
myeffd2 <- includeEffects(myeffd2, degPlus)
myeffd2 <- includeEffects(myeffd2, transTriads)
myeffd2 <- includeEffects(myeffd2, altX, interaction1 = "followers")
myeffd2 <- includeEffects(myeffd2, sameX, interaction1 = "dutch")
myeffd2 <- includeEffects(myeffd2, absDiffX, interaction1 = "pub_first")
#myeffd2 <- includeEffects(myeffd2, sameX, interaction1 = "twitter_dum")
myeffd2 <- includeEffects(myeffd2, sameX, interaction1 = "gender")
(ansd2 <- siena07(myAlgorithm, data = mydata, effects = myeffd2, prevAns = ansd1))
#Save the last model since it has the lowest maximum convergence ratio.
save(ansd2, file="/Users/anuschka/Documents/labjournal/results/data_model_cov2_twit")
#> Estimates, standard errors and convergence t-ratios
#>
#> Estimate Standard Convergence
#> Error t-ratio
#>
#> Rate parameters:
#> 0.1 Rate parameter period 1 1.5603 ( 0.4058 )
#> 0.2 Rate parameter period 2 3.0125 ( 0.6737 )
#>
#> Other parameters:
#> 1. eval degree (density) -2.1450 ( 0.3680 ) 0.0551
#> 2. eval transitive triads 1.2515 ( 0.2246 ) 0.0130
#> 3. eval degree act+pop 0.0362 ( 0.0347 ) 0.0311
#> 4. eval same gender -0.0548 ( 0.2077 ) -0.0160
#> 5. eval followers alter 0.0001 ( 0.0002 ) -0.0121
#> 6. eval same dutch -0.0650 ( 0.2015 ) 0.0213
#> 7. eval pub_first abs. difference -0.0152 ( 0.0123 ) 0.0544
#>
#> Overall maximum convergence ratio: 0.1298
#>
#>
#> Total of 2581 iteration steps.
#>
#> Covariance matrix of estimates (correlations below diagonal)
#>
#> 0.135 0.000 -0.009 -0.023 0.000 -0.022 -0.001
#> -0.005 0.050 -0.003 -0.001 0.000 0.005 0.000
#> -0.717 -0.369 0.001 0.000 0.000 0.000 0.000
#> -0.303 -0.020 -0.033 0.043 0.000 -0.001 0.000
#> -0.015 0.039 -0.013 0.027 0.000 0.000 0.000
#> -0.302 0.119 -0.012 -0.029 -0.082 0.041 0.000
#> -0.197 -0.014 -0.106 0.054 0.141 -0.138 0.000
#>
#> Derivative matrix of expected statistics X by parameters:
#>
#> 84.171 51.346 2402.453 96.072 -4967.099 98.418 1696.755
#> 68.536 122.314 2827.317 83.713 -1694.635 75.314 1453.673
#> 910.780 880.514 33037.362 1054.028 -30173.021 1047.369 19293.264
#> 50.471 34.201 1464.750 105.509 -4088.447 62.394 1005.662
#> -354.689 -3640.509 -47601.636 -1147.868 39942504.726 2037.584 -114080.782
#> 47.358 26.061 1307.595 57.640 -982.981 101.096 997.217
#> 840.540 588.008 25571.317 951.528 -162536.299 1035.655 30237.141
#>
#> Covariance matrix of X (correlations below diagonal):
#>
#> 136.490 185.109 5253.190 162.255 1906.494 153.062 2860.421
#> 0.728 473.669 9881.528 235.749 6551.129 206.929 4094.380
#> 0.899 0.908 250126.502 6343.140 174637.788 5814.775 114835.946
#> 0.812 0.634 0.742 292.269 181.565 194.131 3420.492
#> 0.017 0.031 0.036 0.001 93457572.299 5367.309 -214395.557
#> 0.823 0.597 0.730 0.713 0.035 253.706 3212.630
#> 0.837 0.643 0.785 0.684 -0.076 0.689 85609.460