Network Scale-Up Models for Aggregated Relational Data
Project description
This package fits several different Network Scale-Up Models (NSUM) to Aggregated Relational Data (ARD). ARD represents survey responses to questions of the form: "How many X’s do you know?", where respondents report how many people they know in different subpopulations.
Specifically, if Nᵢ respondents are asked about Nₖ subpopulations, then the ARD is an Nᵢ times Nₖ matrix, where the (i, j) element represents how many people respondent i reports knowing in subpopulation j.
NSUM leverages these responses to estimate the unknown size of hard-to-reach populations.
In this package, we provide functions to estimate the size and accompanying parameters (e.g. degrees) from 2 papers:
Killworth, P. D., Johnsen, E. C., McCarty, C., Shelley, G. A., and Bernard, H. R. (1998) plug-in MLE
Killworth, P. D., McCarty, C., Bernard, H. R., Shelley, G. A., and Johnsen, E. C. (1998) MLE
Requirements
This package requires the following Python libraries:
numpypandas
PIMLE
The plug-in MLE (PIMLE) estimator from Killworth, P. D., Johnsen, E. C., McCarty, C., Shelley, G. A., and Bernard, H. R. (1998) is a two-stage estimator that first estimates the degrees for each respondent dᵢ by maximizing the following likelihood for each respondent:
Where: L is the number of subpopulations with known sizes Nₖ. yᵢₖ is the number of people respondent i reports knowing in subpopulation k. (⁽ᵈⁱ⁾⁄₍ʸⁱₖ₎) is the binomial coefficient. In the second stage, the model plugs in the estimated dᵢ into the equation:
To summarize, Stage 1 estimates dᵢ using:
Stage 2 estimates the unknown subpopulation size Nₖ with:
Here is an example of this package creating an estimate using the PIMLE function:
pimle.est = killworth(ard,
known_sizes = sizes[c(1, 2, 4)],
known_ind = c(1, 2, 4),
N = N, model = "PIMLE")
Note that the function will provide a warning saying that at least dᵢ was 0. This occurs when a respondent does not resport knowing anyone in the known subpopulations. This is an issue for the PIMLE since a 0 value is in the denominator for N̂ᵤᴾᴵᴹᴸᴱ . Thus, we ignore the responses from respondents that correspond to dᵢ =0 .
MLE
Next, we analyze the data from the Killworth, P. D., McCarty, C., Bernard, H. R., Shelley, G. A., and Johnsen, E. C. (1998) MLE estimator. This is also a two-stage model, which an identical first stage, i.e.
However, the second stage estimates Nₖ by maximizing the Binomial likelihood with respect to Nₖ , fixing dᵢ at the estimated d̂ᵢ . Thus, the estimate for the unknown subpopulation size is given by
For example, the estimate can be obtained using:
mle.est = killworth(ard,
known_sizes = sizes[c(1, 2, 4)],
known_ind = c(1, 2, 4),
N = N, model = "MLE")
Note that this function will not create a warning for a dᵢ =0 value since the denominator depends on the summation of d̂ᵢ.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file networkscaleup-0.0.10.tar.gz.
File metadata
- Download URL: networkscaleup-0.0.10.tar.gz
- Upload date:
- Size: 3.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d76245ccbf0563a31ca11341f48f57a4f08e29950d05ed37eae08154e545bdd
|
|
| MD5 |
ff64b12e805023e52ac4bd84c0518607
|
|
| BLAKE2b-256 |
ba53f5b1944b464e6257b2c389579e43bbe078f70538e4801e67f73be9cd3f08
|
File details
Details for the file networkscaleup-0.0.10-py3-none-any.whl.
File metadata
- Download URL: networkscaleup-0.0.10-py3-none-any.whl
- Upload date:
- Size: 3.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b5d8d52000b37ec71e395ade88436d5b002fed5980265ee3705cd22374ced59
|
|
| MD5 |
3c8b517471ef4c1bdca1eb8760885103
|
|
| BLAKE2b-256 |
bbcd3e59b86825d9f5bd6b409914bf7c82aa40b27da263318a2620c6232c74e8
|