Description Usage Arguments Details Value References See Also Examples
Residuals are calculated using the formula
(y_i - E[y_i]) / √{E[y]_i}
which treats each element of the citation counts vector as a Poisson variate.
If the expected value is zero, NA
is returned.
(You can decide for yourself whether to omit these observations, treat them as zero or use some other approach.)
1 | profile_residuals(expected, observed)
|
expected |
Predicted vector of citations, based on some model |
observed |
Vector of observed citations from the journal of interest |
We might want to make a generic S3 function like stats::residuals()
.
Deviance residuals may be added later. For now we have Pearson residuals only.
A numeric vector of standardised residuals, the same length as expected
and observed
Agresti, Alan (2002). Categorical Data Analysis (2nd ed., pp. 366–367). New York, NY: Wiley.
Other functions for residual analysis of communities: community_residuals
,
fitted_citations
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.