IQSS / ZeligNetwork

Network Regressions for Zelig 4
zeligdev.github.com
1 stars 0 forks source link

Re-develop setx.netglm #1

Open whatever opened 12 years ago

whatever commented 12 years ago

'netglm' models require specially structured data sets to work with. Typically, this requires the adaptation of a matrix into a data.frame. That is, the netglm models convert N by N matrices into data.frame's containing N * N rows.

It seems that this method requires a more robust approach than the current implementation, as very few data sets are available to test these models with.

Additionally, the code contains comments such as "This is the problem" which leave vague clues to where the code has weaknesses.

whatever commented 12 years ago

A simple solution might be to simply test whether data-set passed to the Zelig function is an array of matrices. If it is, we should convert the matrix into a data.frame. If the data-set is already a matrix we should do nothing.

whatever commented 12 years ago

It might be appropriate for this fix to actually go within "setx.default". Converting adjacency matrices into data.frames should probably be a separate function that is part of this package (and should run from a hook)