Description Usage Arguments Details Value Author(s) References See Also Examples
These functions compute Wald-type and score-type tests for results estimated by siena07.
1 2 3 4 5 | Wald.RSiena(A, ans)
Multipar.RSiena(ans, ...)
score.Test(ans, test=ans$test)
|
A |
A |
ans |
An object of class |
... |
One or more integer numbers between 1 and |
test |
One or more integer numbers between 1 and |
The hypothesis tested by Wald.RSiena
is Aθ = 0, where θ is
the parameter estimated in the process leading to ans
.
The hypothesis tested by Multipar.RSiena
is that all
parameters given in … are 0. This is a special case of
the preceding.
The tested effects for score.Test
should have been specified
in includeEffects
or setEffect
with
fix=TRUE, test=TRUE
, i.e., they should not have been estimated.
The hypothesis tested by score.Test
is that the tested parameters have
the value indicated in the effects object used for obtaining ans
.
These tests should be carried out only when convergence is adequate (overall maximum convergence ratio less than 0.25 and all t-ratios for convergence less than 0.1 in absolute value).
These functions have their own print method, see print.sienaTest
.
An object of class sienaTest
, which is a list with elements:
chisquare: The test statistic, assumed to have a chi-squared null distribution.
df: The degrees of freedom.
pvalue: The associated p-value.
onesided: For df
=1, the onesided test statistic.
efnames: For Multipar.RSiena
and score.Test
, the names
of the tested effects.
Tom Snijders
See the manual and http://www.stats.ox.ac.uk/~snijders/siena/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | mynet <- sienaDependent(array(c(s501, s502), dim=c(50, 50, 2)))
mydata <- sienaDataCreate(mynet)
myeff <- getEffects(mydata)
myalgorithm <- sienaAlgorithmCreate(nsub=1, n3=40, seed=1777, projname=NULL)
# nsub=1 and n3=40 is used here for having a brief computation,
# not for practice.
myeff <- includeEffects(myeff, transTrip, transTies)
myeff <- includeEffects(myeff, outAct, outPop, fix=TRUE, test=TRUE)
(ans <- siena07(myalgorithm, data=mydata, effects=myeff, batch=TRUE))
A <- matrix(0, 2, 6)
A[1, 3] <- 1
A[2, 4] <- 1
wa <- Wald.RSiena(A, ans)
wa
# A shortcut for the above is:
Multipar.RSiena(ans, 3, 4)
# The following two are equivalent:
sct <- score.Test(ans, c(FALSE, FALSE, FALSE, FALSE, FALSE, TRUE))
sct <- score.Test(ans,6)
print(sct)
# Getting all 1-df score tests separately:
# (More identifying information for the effects may be added as necessary)
for (i in which(ans$test)){
sct <- score.Test(ans,i)
cat(ans$requestedEffects$effectName[i], '\n')
print(sct)}
# Testing that endowment and creation effects are identical:
myeff1 <- getEffects(mydata)
myeff1 <- includeEffects(myeff1, recip, include=FALSE)
myeff1 <- includeEffects(myeff1, recip, type='creation')
(myeff1 <- includeEffects(myeff1, recip, type='endow'))
(ans1 <- siena07(myalgorithm, data=mydata, effects=myeff1, batch=TRUE))
A <- matrix(c(0,1,-1), 1, 3)
(Wald.RSiena(A, ans1))
|
Warning message:
no DISPLAY variable so Tk is not available
siena07 will create an output file /work/tmp/tmp/RtmpAh9EaR/Siena168b4894d5d53.txt .
This is a temporary file for this R session.
effectName include fix test initialValue parm
1 transitive triplets TRUE FALSE FALSE 0 0
2 transitive ties TRUE FALSE FALSE 0 0
effectName include fix test initialValue parm
1 outdegree - popularity TRUE TRUE TRUE 0 0
2 outdegree - activity TRUE TRUE TRUE 0 0
Start phase 0
theta: -1.49 0.00 0.00 0.00 0.00 0.00
Start phase 1
Phase 1 Iteration 1 Progress: 0%
Phase 1 Iteration 2 Progress: 0%
Phase 1 Iteration 3 Progress: 0%
Phase 1 Iteration 4 Progress: 1%
Phase 1 Iteration 5 Progress: 1%
Phase 1 Iteration 10 Progress: 2%
Phase 1 Iteration 15 Progress: 2%
Phase 1 Iteration 20 Progress: 3%
Phase 1 Iteration 25 Progress: 4%
Phase 1 Iteration 30 Progress: 5%
Phase 1 Iteration 35 Progress: 6%
Phase 1 Iteration 40 Progress: 6%
Phase 1 Iteration 45 Progress: 7%
Phase 1 Iteration 50 Progress: 8%
theta: -1.750 0.437 0.650 -0.477 0.000 0.000
Start phase 2.1
Phase 2 Subphase 1 Iteration 1 Progress: 56%
Phase 2 Subphase 1 Iteration 2 Progress: 57%
theta -1.874 0.671 0.830 -0.362 0.000 0.000
ac 0.00378 3.79486 -1.06273 -3.09687 -0.05719 0.12148
Phase 2 Subphase 1 Iteration 3 Progress: 57%
Phase 2 Subphase 1 Iteration 4 Progress: 57%
theta -2.1545 1.2009 0.6376 0.0483 0.0000 0.0000
ac 0.235 2.246 -1.056 -2.625 0.220 0.408
Phase 2 Subphase 1 Iteration 5 Progress: 57%
Phase 2 Subphase 1 Iteration 6 Progress: 57%
theta -2.454 1.711 0.230 0.637 0.000 0.000
ac 0.225 1.826 -1.110 -2.672 0.246 0.472
Phase 2 Subphase 1 Iteration 7 Progress: 57%
Phase 2 Subphase 1 Iteration 8 Progress: 58%
theta -2.621 1.956 0.115 0.669 0.000 0.000
ac -0.2214 0.0523 -1.0209 -1.1194 -0.0999 0.2100
Phase 2 Subphase 1 Iteration 9 Progress: 58%
Phase 2 Subphase 1 Iteration 10 Progress: 58%
theta -2.6549 2.1076 0.0503 0.6892 0.0000 0.0000
ac -0.298 -0.225 -1.081 -1.250 -0.230 0.104
theta -2.620 2.096 0.307 0.540 0.000 0.000
ac -0.4355 -0.5384 -0.7333 -0.9225 -0.1641 -0.0898
theta: -2.620 2.096 0.307 0.540 0.000 0.000
Start phase 3
Estimates, standard errors and convergence t-ratios
Estimate Standard Convergence
Error t-ratio
Rate parameters:
0 Rate parameter 6.6977 ( 1.0182 )
Other parameters:
1. eval outdegree (density) -2.6200 ( 0.1514 ) -0.4627
2. eval reciprocity 2.0958 ( 0.2976 ) -0.5244
3. eval transitive triplets 0.3066 ( 0.2922 ) -0.8100
4. eval transitive ties 0.5397 ( 0.4471 ) -0.6856
5. eval outdegree - popularity 0.0000 ( NA ) 0.1821
6. eval outdegree - activity 0.0000 ( NA ) 0.1142
Overall maximum convergence ratio: 0.9363
Score test for 2 parameters:
chi-squared = 6.33, p = 0.0422.
Total of 122 iteration steps.
chi-squared = 25.49, d.f. = 2; p < 0.001.
Tested effects:
mynet: transitive triplets
mynet: transitive ties
chi-squared = 25.49, d.f. = 2; p < 0.001.
Tested effects:
mynet: outdegree - activity
chi-squared = 3.56, d.f. = 1; one-sided Z = -1.89; p = 0.059.
outdegree - popularity
Tested effects:
mynet: outdegree - popularity
chi-squared = 6.10, d.f. = 1; one-sided Z = -2.47; p = 0.014.
outdegree - activity
Tested effects:
mynet: outdegree - activity
chi-squared = 3.56, d.f. = 1; one-sided Z = -1.89; p = 0.059.
[1] effectName include fix test initialValue
[6] parm
<0 rows> (or 0-length row.names)
effectName include fix test initialValue parm type
1 reciprocity TRUE FALSE FALSE 0 0 creation
effectName include fix test initialValue parm type
1 reciprocity TRUE FALSE FALSE 0 0 endow
effectName include fix test initialValue parm type
1 basic rate parameter mynet TRUE FALSE FALSE 4.69604 0 rate
2 outdegree (density) TRUE FALSE FALSE -1.48852 0 eval
3 reciprocity TRUE FALSE FALSE 0.00000 0 endow
4 reciprocity TRUE FALSE FALSE 0.00000 0 creation
Start phase 0
theta: -1.49 0.00 0.00
Start phase 1
Phase 1 Iteration 1 Progress: 0%
Phase 1 Iteration 2 Progress: 0%
Phase 1 Iteration 3 Progress: 1%
Phase 1 Iteration 4 Progress: 1%
Phase 1 Iteration 5 Progress: 1%
Phase 1 Iteration 10 Progress: 2%
Phase 1 Iteration 15 Progress: 3%
Phase 1 Iteration 20 Progress: 4%
Phase 1 Iteration 25 Progress: 5%
Phase 1 Iteration 30 Progress: 6%
Phase 1 Iteration 35 Progress: 8%
Phase 1 Iteration 40 Progress: 9%
Phase 1 Iteration 45 Progress: 10%
Phase 1 Iteration 50 Progress: 11%
theta: -1.5212 -0.0961 1.0000
Start phase 2.1
Phase 2 Subphase 1 Iteration 1 Progress: 43%
Phase 2 Subphase 1 Iteration 2 Progress: 43%
theta -1.568 -0.177 2.396
ac 0.579 6.448 2.755
Phase 2 Subphase 1 Iteration 3 Progress: 44%
Phase 2 Subphase 1 Iteration 4 Progress: 44%
theta -1.767 -0.109 4.356
ac 0.836 0.913 1.358
Phase 2 Subphase 1 Iteration 5 Progress: 44%
Phase 2 Subphase 1 Iteration 6 Progress: 44%
theta -1.977 0.129 4.282
ac 0.895 -0.346 1.139
Phase 2 Subphase 1 Iteration 7 Progress: 45%
Phase 2 Subphase 1 Iteration 8 Progress: 45%
theta -2.080 0.569 2.915
ac 0.770 0.148 0.443
Phase 2 Subphase 1 Iteration 9 Progress: 45%
Phase 2 Subphase 1 Iteration 10 Progress: 45%
theta -2.102 0.581 4.549
ac 0.8067 0.1411 0.0306
theta -2.066 0.971 3.478
ac -0.192 -0.012 -0.608
theta: -2.066 0.971 3.478
Start phase 3
Estimates, standard errors and convergence t-ratios
Estimate Standard Convergence
Error t-ratio
Rate parameters:
0 Rate parameter 4.3298 ( 0.4866 )
Other parameters:
1. eval outdegree (density) -2.0655 ( 0.2415 ) 0.1263
2. endow reciprocity 0.9706 ( 1.0712 ) 0.0339
3. creat reciprocity 3.4778 ( 0.4926 ) 0.0876
Overall maximum convergence ratio: 0.1794
Total of 218 iteration steps.
chi-squared = 4.24, d.f. = 1; one-sided Z = -2.06; p = 0.039.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.