Description Details Author(s) See Also Examples
Tools for creating sequence statistics for Butts's egocentric relational event model fitting software in the library(relevent)
R package.
Package: | informR |
Type: | Package |
Version: | 1.0 |
Date: | 2011-04-17 |
License: | GPL 2.0 or greater |
LazyLoad: | yes |
Use this package to create variables and assemble statslists and eventlists from regular expressions for egocentric relational event model fitting using Butts's library(relevent)
package.
Author and Maintainer:Christopher Steven Marcum <cmarcum@uci.edu>
rem
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | rawevents<-sample(rep(c("ran","eat","stay","eat","ran","play"),50))
actors<-rep(c("Jim","Bill","Pete"),100)
evmat<-cbind(rawevents,actors)
eventlist<-gen.evl(evmat)
#See event-type alphabetic token codes
eventlist$event.key
alpha.ints<-gen.intercepts(eventlist,basecat="ran")
#Create some inertial s-form statistics and fit the models
beta.sforms<-gen.sformlist(eventlist,c("aa","bb","cc","dd"))
#Combine s-form matrices with intercepts
beta.ints<-slbind(beta.sforms,alpha.ints,new.names=TRUE,event.key=eventlist$event.key)
fitalpha.rem<-rem(eventlist=eventlist$eventlist,statslist=alpha.ints,estimator="BPM")
fitbeta.rem<-rem(eventlist=eventlist$eventlist,statslist=beta.ints,estimator="BPM")
summary(fitalpha.rem)
summary(fitbeta.rem)
for(i in c("aa","bb","cc","dd")) count.sform(eventlist,i)
|
Loading required package: abind
Loading required package: 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.15 created on 2019-04-01.
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.
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.
id event.type
[1,] "a" "play"
[2,] "b" "ran"
[3,] "c" "eat"
[4,] "d" "stay"
Egocentric Relational Event Model (Ordinal Likelihood)
Post.Mode Post.SD Z value Pr(>|z|)
play -6.9315e-01 1.7321e-01 -4.0019 6.284e-05 ***
eat 1.7329e-08 1.4142e-01 0.0000 1
stay -6.9315e-01 1.7321e-01 -4.0019 6.284e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Null deviance: 831.7766 on 300 degrees of freedom
Residual deviance: 797.7968 on 297 degrees of freedom
Chi-square: 33.97981 on 3 degrees of freedom, asymptotic p-value 2.00073e-07
AIC: 803.7968 AICC: 803.8779 BIC: 814.9082
Log posterior: -3401.841
Prior parameters: mu=0 sigma=1000 nu=4
Egocentric Relational Event Model (Ordinal Likelihood)
Post.Mode Post.SD Z value Pr(>|z|)
play -0.50259 0.20319 -2.4735 0.013379 *
eat 0.14188 0.19600 0.7239 0.469139
stay -0.58319 0.20648 -2.8245 0.004736 **
playplay -0.92062 0.54930 -1.6760 0.093741 .
ranran 0.23610 0.26630 0.8866 0.375310
eateat -0.20326 0.27265 -0.7455 0.455966
staystay -0.21781 0.44366 -0.4909 0.623477
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Null deviance: 831.7766 on 300 degrees of freedom
Residual deviance: 792.9202 on 293 degrees of freedom
Chi-square: 38.85639 on 7 degrees of freedom, asymptotic p-value 2.081702e-06
AIC: 806.9202 AICC: 807.3038 BIC: 832.8467
Log posterior: -7403.326
Prior parameters: mu=0 sigma=1000 nu=4
[1] Total instances of playplay : 4
[1] Total instances of ranran : 28
[1] Total instances of eateat : 22
[1] Total instances of staystay : 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.