Hi,
I am using the nwcommands package to run some social network analysis.
I am facing two issues-
1. When i use nwplot to graph a network, the symbol command does not seem to work. I am not experiencing any error but the graph does not have different symbols for the different categories:
My command is: nwplot, lab color (status_sn_) symbol(caste) title(Known, margin(b=5))
and the graph that shows up is the attached file, with all the other commands working fine. I have downloaded all nwcommand files and updated them but cannot figure out why the symbol command specifically does not work.
Array
2. I am running the analysis for 40 villages and have written the nwset and nwplot code within a loop over the village codes. However, despite having no errors with the graph export command , my destination folder remains empty after the entire loop runs.
The code is as below:
levelsof village
foreach lev in `r(levels)'{
preserve
keep if village==`lev'
keep village hhid hhid_sn_ know_pers status_sn_
replace hhid_sn_=hhid if know_pers==0
nwset hhid hhid_sn_, edgelist
joinby _nodelab using "Status_SN.dta"
nwplot ,lab color(status_sn_) title(Known, margin(b=5))
graph export "C:\Users\manavigupta\Desktop\graphs_SN\`lev'1 .png ", replace
restore
Thanks in advance for the help!
Related Posts with Network Analysis-nwcommands
Marginal Effects of Simultaneous Equation Systems or IV-RegressionsHi All, I would like to post-estimate marginal effects by group after executing reg3 or xtivreg. Fo…
xtabond2 with unbalanced panels and missing values in betweenHi everyone, I am conducting an empirical work where I am estimating the effect of financial develo…
Non-radial efficiency in DEAHello everyone! I am using DEA to estimate the efficiency scores of DMUs. I am aware of the 'dea' an…
Generating a new variableGood day! In this dataset I have, I have different indicators of innovation: (innov1, innov2, innov3…
Gini coefficient and Lorenz curveDear Statalist, I’m using Stata for the first time for a school assignment and since my knowledge o…
Subscribe to:
Post Comments (Atom)
0 Response to Network Analysis-nwcommands
Post a Comment