Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Wald

Wald and score tests for RSiena results


Description

These functions compute Wald-type and score-type tests for results estimated by siena07.

Usage

Wald.RSiena(A, ans)

Multipar.RSiena(ans, ...)

score.Test(ans, test=ans$test)

testSame.RSiena(ans, e1, e2)

Arguments

A

A k * p matrix, where p = ans$pp, the number of parameters in ans excluding the basic rate parameters used for conditional estimation.

ans

An object of class sienaFit, resulting from a call to siena07.

...

One or more integer numbers between 1 and p, specifying the tested effects (numbered as in print(ans); if conditional estimation was used, numbered as the 'Other parameters').

test

One or more integer numbers between 1 and p, or a logical vector of length p; these should specify the tested effects (numbered as described for the ...).

e1,e2

Each an integer number between 1 and p, or a vector of such numbers; the hypothesis tested is that the parameters for effects with number/s e1 are equal to those in e2.

Details

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 Wald.RSiena.

The hypothesis tested by testSame.RSiena is that all parameters given in e1 are equal to those in e2. This also is a special case of Wald.RSiena.

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.

Value

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.

Author(s)

Tom Snijders

References

See Also

Examples

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:
for (i in which(ans$test)){
   sct <- score.Test(ans,i)
   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))
testSame.RSiena(ans1, 2, 3)

RSiena

Siena - Simulation Investigation for Empirical Network Analysis

v1.3.0
GPL-2 | GPL-3 | file LICENSE
Authors
Tom A.B. Snijders [cre, aut] (<https://orcid.org/0000-0003-3157-4157>), Ruth Ripley [aut], Christian Steglich [aut, ctb] (<https://orcid.org/0000-0002-9097-0873>), Johan Koskinen [aut, ctb] (<https://orcid.org/0000-0002-6860-325X>), Nynke Niezink [aut, ctb], Viviana Amati [aut, ctb] (<https://orcid.org/0000-0003-1190-1237>), Christoph Stadtfeld [ctb] (<https://orcid.org/0000-0002-2704-2134>), James Hollway [ctb] (IHEID, <https://orcid.org/0000-0002-8361-9647>), Per Block [ctb], Robert Krause [ctb], Charlotte Greenan [ctb], Josh Lospinoso [ctb], Michael Schweinberger [ctb] (<https://orcid.org/0000-0003-3649-5386>), Mark Huisman [ctb], Krists Boitmanis [ctr], Felix Schoenenberger [ctb], Mark Ortmann [ctb], Marion Hoffman [ctb], Robert Hellpap [ctb], Alvaro Uzaheta [ctb]
Initial release
2021-05-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.