Estimates the parameter of the AB-Ab-aB-ab blood group system.

AB.Ab.aB.ab(link = "logitlink", init.p = NULL)

Arguments

Link function applied to p. See Links for more choices.

init.p

Optional initial value for p.

Details

This one parameter model involves a probability called p.

Value

An object of class "vglmff" (see vglmff-class). The object is used by modelling functions such as vglm and vgam.

References

Lange, K. (2002). Mathematical and Statistical Methods for Genetic Analysis, 2nd ed. New York: Springer-Verlag.

Author

T. W. Yee

Note

The input can be a 4-column matrix of counts, where the columns are AB, Ab, aB and ab (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.

See also

Examples

ymat <- cbind(AB=1997, Ab=906, aB=904, ab=32)  # Data from Fisher (1925)
fit <- vglm(ymat ~ 1, AB.Ab.aB.ab(link = "identitylink"), trace = TRUE)
#> Iteration 1: deviance = 2.018914
#> Iteration 2: deviance = 2.018722
#> Iteration 3: deviance = 2.018721
#> Iteration 4: deviance = 2.018721
fit <- vglm(ymat ~ 1, AB.Ab.aB.ab, trace = TRUE)
#> Iteration 1: deviance = 2.01883
#> Iteration 2: deviance = 2.018722
#> Iteration 3: deviance = 2.018721
#> Iteration 4: deviance = 2.018721
rbind(ymat, sum(ymat)*fitted(fit))
#>         AB       Ab       aB       ab
#>   1997.000 906.0000 904.0000 32.00000
#> 1 1953.775 925.4751 925.4751 34.27487
Coef(fit)  # Estimated p
#>         p 
#> 0.1889769 
p <- sqrt(4*(fitted(fit)[, 4]))
p*p
#> [1] 0.03571229
summary(fit)
#> 
#> Call:
#> vglm(formula = ymat ~ 1, family = AB.Ab.aB.ab, trace = TRUE)
#> 
#> Coefficients: 
#>             Estimate Std. Error z value Pr(>|z|)    
#> (Intercept) -1.45667    0.05039  -28.91   <2e-16 ***
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#> 
#> Name of linear predictor: logitlink(p) 
#> 
#> Residual deviance: 2.0187 on 0 degrees of freedom
#> 
#> Log-likelihood: -11.983 on 0 degrees of freedom
#> 
#> Number of Fisher scoring iterations: 4 
#> 
#> Warning: Hauck-Donner effect detected in the following estimate(s):
#> '(Intercept)'
#>