slbind.cond: Add ActorXEvent Conditional or Interaction Variables to a...

Description Usage Arguments Details Note Author(s) See Also Examples

Description

Combines a single actor-level attribute with sufficient statistics from a statslist array using a wrapper for abind() in the abind package.

Usage

1
slbind.cond(intvar, statslist, var.suffix, sl.ind=NULL,who.evs=NULL,type = 1,...)

Arguments

intvar

An actor-level numeric variable. See Details.

statslist

A statslist object, possibly passed from gen.intercepts.

var.suffix

A character string naming the new variable(s).

sl.ind

A numeric vector containing the statslist column indices to be interacted with intvar. Defaults to all columns. See Details.

who.evs

If type=2, a numeric vector indexing where to apply the interaction. Optional.

type

Indicates where the combining is going to occur in statslist. 1 for global, 2 for local.

...

Additional methods passed to abind().

Details

For global statistics, length(intvar)==length(statslist) must be true. Because current functionality allows for only single vectors, the user must iterate over all levels of factors with more than two levels. Thus, this is truly a _single variable_ function and care must be taken.

The sl.ind parameter should be carefully specified as improper interactions can result in over-identified or unidentifiable models.

Note

slbind.cond can accept abind arguments.

Author(s)

Christopher Steven Marcum

See Also

slbind, abind,slbind.cov

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)
beta.ints<-gen.intercepts(eventlist)


statslist.new<-slbind.cond(intvar=c(1,0,0),beta.ints,var.suffix="Jim")
statslist.new[[1]][[1]][1,,]
statslist.new[[2]][[1]][1,,]
statslist.new[[3]][[1]][1,,]

informR documentation built on May 1, 2019, 9:22 p.m.