Chapter03 {DanielBiostatistics10th}R Documentation

Chapter 3: Some Basic Probability Concepts

Description

Examples in Chapter 3, Some Basic Probability Concepts.

Value

No function defined for Chapter 3.

Examples

library(DanielBiostatistics10th)

# Example 3.4.1-3.4.9; Page 69-75 (10th ed), Page 61-67 (11th ed)
(d341 = matrix(c(28L, 19L, 41L, 53L, 35L, 38L, 44L, 60L), ncol = 2L, dimnames = list(
  FamilyHx = c('none', 'Bipolar', 'Unipolar', 'UniBipolar'), Onset = c('Early', 'Late'))))
class(d341) # 'matrix', i.e., a two-dimensional 'array'
addProbs(d341)
addProbs(d341, margin = 1L)
addProbs(d341, margin = 2L)

# Example 3.5.1; Page 81 (10th ed), Page 72 (11th ed)
(d351 = matrix(c(436L, 14L, 5L, 495L), nrow = 2L, dimnames = list(
  Test = c('Positive', 'Negative'), Alzheimer = c('Yes', 'No'))))
summary(BooleanTable(t(d351)), prevalence = .113)


[Package DanielBiostatistics10th version 0.2.1 Index]