Description Usage Arguments Details Note Author(s) See Also Examples
Combines statslist arrays using a wrapper for abind()
in the abind package.
1 |
sformstats |
An sformstats object, possibly passed from |
statslist |
A statslist object, possibly passed from |
type |
Indicates where the combining is going to occur in the output statslist. 1 for global, 2 for local. |
new.names |
Either logical or character string. Choose the ouput variable names. See details. |
... |
Additional arguments passed to |
The new.names
parameter defaults to FALSE, which sets the variable names in the output to be whatever was passed from the names of the kth elements of each ijk array in sformstats
, as in the default behavior in abind()
. Setting new.names
to TRUE tries to guess variable names using sf2nms
. If TRUE, then ...
must contain an event.key from the eventlist object that statslist
was built upon (e.g, event.key=eventlist$event.key
). If new.names
is passed as a character vector, then its length must be equal to the number of the kth elements of each ijk array in sformstats
.
In the case that new.names
is TRUE, it is possible to retrieve the original variable names by: names(dimnames(output[[x]][[type]]))
, where output is the statslist generated by slbind()
, x is any index, and type is type
as defined above.
slbind
can accept abind
arguments.
Christopher Steven Marcum
1 2 3 4 5 6 7 8 9 10 11 12 | 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)
beta.sforms<-gen.sformlist(eventlist,c("a+b","bb"))
statslist<-slbind(beta.sforms,beta.ints)
statslist[[1]][[1]][1:3,,]
#Compare with:
statslist<-slbind(beta.sforms,beta.ints,new.names=TRUE,event.key=eventlist$event.key)
dimnames(statslist[[1]][[1]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.