strAlloc | R Documentation |

Compute the proportional, Neyman, cost-constrained, and variance-constrained allocations in a stratified simple random sample.

strAlloc(n.tot = NULL, Nh = NULL, Sh = NULL, cost = NULL, ch = NULL, V0 = NULL, CV0 = NULL, ybarU = NULL, alloc)

`n.tot` |
fixed total sample size |

`Nh` |
vector of population stratum sizes ( |

`Sh` |
stratum unit standard deviations ( |

`cost` |
total variable cost |

`ch` |
vector of costs per unit in stratum |

`V0` |
fixed variance target for estimated mean |

`CV0` |
fixed CV target for estimated mean |

`ybarU` |
population mean of |

`alloc` |
type of allocation; must be one of |

`alloc="prop"`

computes the proportional allocation of a fixed total sample size, `n.tot`

, to the strata. `alloc="neyman"`

computes the allocation of a fixed total sample size, `n.tot`

, to the strata that minimizes the variance of an estimated mean. `alloc="totcost"`

computes the allocation of a fixed total sample size, `n.tot`

, to the strata that minimizes the variance of an estimated mean subject to the fixed total `cost`

. `alloc="totvar"`

computes the allocation that minimizes total cost subject to the target coefficient of variation, `CV0`

, or the target variance, `V0`

, of the estimated mean.

For proportional allocation, a list with values:

`alloc` |
type of allocation: |

`Nh` |
vector of population sizes ( |

`nh` |
vector of stratum sample sizes |

`"nh/n"` |
proportion of sample allocated to each stratum |

For other allocations, the three components above plus:

`Sh` |
stratum unit standard deviations ( |

`"anticipated SE of estimated mean"` |
Anticipated SE of the estimated mean for the computed allocation |

Richard Valliant, Jill A. Dever, Frauke Kreuter

Cochran, W.G. (1977). *Sampling Techniques*. John Wiley & Sons.

Valliant, R., Dever, J., Kreuter, F. (2018, chap. 3). *Practical Tools for Designing and Weighting Survey Samples, 2nd edition*. Springer.

`nCont`

, `nLogOdds`

, `nProp`

, `nPropMoe`

, `nWilson`

# Neyman allocation Nh <- c(215, 65, 252, 50, 149, 144) Sh <- c(26787207, 10645109, 6909676, 11085034, 9817762, 44553355) strAlloc(n.tot = 100, Nh = Nh, Sh = Sh, alloc = "neyman") # cost constrained allocation ch <- c(1400, 200, 300, 600, 450, 1000) strAlloc(Nh = Nh, Sh = Sh, cost = 100000, ch = ch, alloc = "totcost") # allocation with CV target of 0.05 strAlloc(Nh = Nh, Sh = Sh, CV0 = 0.05, ch = ch, ybarU = 11664181, alloc = "totvar")

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.