Dear all, I am new to tnam and looking for help.
I have a directed network with 91 actors (only one time point) and a number of actor's attributes. My data are rather sensitive, but I try to provide a minimal example here. The dependent variable here is named hetero.
This is the code
`library(statnet)
library(tnam)
library(texreg)
#read in network data#
tgnet <- read.csv("C:/Users/Anja Osei/Desktop/Togo data original/tgnet.csv", row.names=1, sep=";", stringsAsFactors=FALSE)
View(tgnet)
tgnet<-as.matrix(tgnet)
tgnet<-as.network(tgnet)
plot(togonet)
#read in attribute data#
tgexample <- read.csv("C:/Users/Anja Osei/Desktop/Togo data original/tgexample.csv", row.names=1, sep=";", stringsAsFactors=FALSE)
#set network attributes#
set.vertex.attribute(tgnet, "year", tgexample$year)
#minimal example using clustering and year#
model1<-tnam(tgexample$hetero~clustering(tgnet)+covariate(tgexample$year, coefname="year"))
summary(model1)
#using tnamdata, clustering produces NAs#
tnamdata(tgexample$hetero~clustering(tgnet)+covariate(tgexample$year, coefname="year"))
#if I add clustering as a covariate, it runs. I have exactly this problem with whatever I try, centrality, netlag... everything#
test<-clustering(tgnet)
model2<-tnam(tgexample$hetero~covariate(test$clustering, coefname="clustering")+covariate(tgexample$year, coefname="year"))
summary(model2)`
Files.zip
Thanks in advance for any suggestions.