ABO.RdEstimates the two independent parameters of the the ABO blood group system.
ABO(link.pA = "logitlink", link.pB = "logitlink", ipA = NULL, ipB = NULL,
ipO = NULL, zero = NULL)Link functions applied to pA and pB.
See Links for more choices.
Optional initial value for pA and pB and pO.
A NULL value means values are computed internally.
Details at CommonVGAMffArguments.
The parameters pA and pB are probabilities, so that
pO=1-pA-pB is the third probability.
The probabilities pA and pB correspond to A and B respectively,
so that pO is the probability for O.
It is easier to make use of initial values for pO than for pB.
In documentation elsewhere I sometimes use
pA=p,
pB=q,
pO=r.
An object of class "vglmff" (see vglmff-class).
The object is used by modelling functions such as vglm
and vgam.
Lange, K. (2002). Mathematical and Statistical Methods for Genetic Analysis, 2nd ed. New York: Springer-Verlag.
The input can be a 4-column matrix of counts, where the columns
are A, B, AB, O (in order).
Alternatively, the input can be a 4-column matrix of
proportions (so each row adds to 1) and the weights
argument is used to specify the total number of counts for each row.
ymat <- cbind(A = 725, B = 258, AB = 72, O = 1073) # Order matters, not the name
fit <- vglm(ymat ~ 1, ABO(link.pA = "identitylink",
link.pB = "identitylink"), trace = TRUE,
crit = "coef")
#> Iteration 1: coefficients = 0.209130654, 0.080801008
#> Iteration 2: coefficients = 0.209130655, 0.080801008
coef(fit, matrix = TRUE)
#> pA pB
#> (Intercept) 0.2091307 0.08080101
Coef(fit) # Estimated pA and pB
#> pA pB
#> 0.20913065 0.08080101
rbind(ymat, sum(ymat) * fitted(fit))
#> A B AB O
#> 725.0000 258.000 72.00000 1073.000
#> 1 725.0729 258.078 71.91775 1072.931
sqrt(diag(vcov(fit)))
#> (Intercept):1 (Intercept):2
#> 0.006628726 0.004267233