(1)
clear
input y x
1 7
2 6
3 5
4 4
5 3
6 2
7 1
end
l
contract y x
reshape wide _freq , i(y) j(x)
qui foreach v of var _freq* {
replace `v' = 0 if mi(`v')
}
l
(2)
clear
input y x
1 7
2 6
3 5
end
netsis y x, measure(p) directed name (net1, replace)
mata net1