Description Usage Arguments Examples
View source: R/get-effects-dist.R
A function to estimate the parameters of an RSiena model many times. Returns a data frame of estimates.
1 | get_effects_dist(dat, struct, N)
|
dat |
A Siena data object. For more information see ?RSiena::sienaDataCreate |
struct |
A Siena effects structure object. Include all effects you wish to include in the model. See ?RSiena::getEffects for more. |
N |
integer. Number of times you'd like to fit the model |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
# data set up from \url{https://www.stats.ox.ac.uk/~snijders/siena/basicRSiena.r}
library(RSiena)
friend.data.w1 <- as.matrix(read.table("data/s50-network1.dat"))
friend.data.w2 <- as.matrix(read.table("data/s50-network2.dat"))
friend.data.w3 <- as.matrix(read.table("data/s50-network3.dat"))
drink <- as.matrix(read.table("data/s50-alcohol.dat"))
friendshipData <- array(c(friend.data.w1, friend.data.w2, friend.data.w3), dim = c(50, 50, 3))
friendship <- sienaDependent(friendshipData)
alcohol <- varCovar(drink)
mydata <- sienaDataCreate(friendship, alcohol)
M1eff <- getEffects(mydata)
M2eff <- includeEffects(M1eff, jumpXTransTrip, interaction1 = "alcohol")
# M1 estimates
M1ests_bigfriends <- get_effects_dist(dat = mydata, struct = M1eff, N = 1000)
M2ests_bigfriends <- get_effects_dist(dat = mydata, struct = M2eff, N = 1000)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.