netlogit performs a logistic regression of the network variable in y on the network variables in set x. The resulting fits (and coefficients) are then tested against the indicated null hypothesis.
netlogit(y, x, intercept=TRUE, mode="digraph", diag=FALSE, nullhyp=c("qap", "qapspp", "qapy", "qapx", "qapallx", "cugtie", "cugden", "cuguman", "classical"), tol=1e-7, reps=1000)NAs are allowed, and the data should be dichotomous. NAs are permitted, as is dichotomous data. "digraph" indicates that edges should be interpreted as directed; "graph" indicates that edges are undirected. mode is set to "digraph" by default. diag is FALSE by default. qr.solve. reps=1000. netlogit
netlogit is primarily a front-end to the built-in glm.fit routine. netlogit handles vectorization, sets up glm options, and deals with null hypothesis testing; the actual fitting is taken care of by glm.fit. Logistic network regression using is directly analogous to standard logistic regression elementwise on the appropriately vectorized adjacency matrices of the networks involved. As such, it is often a more appropriate model for fitting dichotomous response networks than is linear network regression.
Because of the frequent presence of row/column/block autocorrelation in network data, classical hull hypothesis tests (and associated standard errors) are generally suspect. Further, it is sometimes of interest to compare fitted parameter values to those arising from various baseline models (e.g., uniform random graphs conditional on certain observed statistics). The tests supported by netlogit are as follows:
classical
cugcugtest) controlling for order.
cugden
cugtie
qapqaptest); currently identical to qapspp.
qapallx
qapspp
qapx
qapy
Note that interpretation of quantiles for single coefficients can be complex in the presence of multicollinearity or third variable effects. Although qapspp is known to be robust to these conditions in the OLS case, there are no equivalent results for logistic regression. Caution is thus advised. Reasonable printing and summarizing of netlogit objects is provided by print.netlogit and summary.netlogit, respectively. No plot methods exist at this time.
glm, netlm ## Not run:
# #Create some input graphs
# x<-rgraph(20,4)
#
# #Create a response structure
# y.l<-x[1,,]+4*x[2,,]+2*x[3,,] #Note that the fourth graph is
# #unrelated
# y.p<-apply(y.l,c(1,2),function(a){1/(1+exp(-a))})
# y<-rgraph(20,tprob=y.p)
#
# #Fit a netlogit model
# nl<-netlogit(y,x,reps=100)
#
# #Examine the results
# summary(nl)
# ## End(Not run)
Run the code above in your browser using DataLab