glm.approx | R Documentation |
Fit the model specified in documentation, using either a weighted least squares approach or a generalized linear model approach, with some modifications. This function fits many "simple" logistic regressions (ie zero or one covariate) simultaneously, allowing for the possibility of small sample sizes with low or zero counts. In addition, an alternative model in the form of a weighted least squares regression can also be fit in place of a logistic regression.
glm.approx(
x,
g = NULL,
minobs = 1,
pseudocounts = 0.5,
all = FALSE,
eps = 1e-08,
center = FALSE,
repara = FALSE,
forcebin = FALSE,
lm.approx = FALSE,
disp = c("add", "mult"),
bound = 0.02
)
x |
A matrix of N (# of samples) by 2*B (B: # of WCs or, more precisely, of different scales and locations in multi-scale space); Two consecutive columns correspond to a particular scale and location; The first column (the second column) contains # of successes (# of failures) for each sample at the corresponding scale and location. |
g |
A vector of covariate values. Can be a factor (2 groups
only) or quantitative. For a 2-group categorical covariate, provide
|
minobs |
Minimum number of non-zero required for each model to be fitted (otherwise NA is returned for that model). |
pseudocounts |
A number to be added to counts when counts are zero (or possibly extremely small). |
all |
Bool, if TRUE pseudocounts are added to all entries, if FALSE (default) pseudocounts are added only to cases when either number of successes or number of failures (but not both) is 0. |
center |
Bool, indicating whether to center |
repara |
Bool, indicating whether to reparameterize
|
forcebin |
Bool, if TRUE don't allow for
overdipersion. Defaults to TRUE if |
lm.approx |
Bool, indicating whether a WLS alternative should be used. Defaults to FALSE. |
disp |
A string, can be either "add" or "mult", indicating the
form of overdispersion assumed when |
bound |
Numeric, indicates the threshold of the success vs failure ratio below which pseudocounts will be added. |
A matrix of 2 (or 5 if g is provided) by T (# of WCs); Each row contains alphahat (1st row), standard error of alphahat (2nd), betahat (3rd), standard error of betahat (4th), covariance between alphahat and betahat (5th) for each WC.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.