Description Usage Arguments Details Value Author(s) References See Also

This function demonstrates the advantage of ratio estimation when further information (ratio) about x and y is available.

1 2 3 4 5 6 7 8 9 10 11 12 |

`X` |
the X variable (ancillary) |

`R` |
the population ratio Y/X |

`Y` |
the Y variable (whose mean we what to estimate) |

`size` |
sample size |

`p.col, p.cex, p.pch` |
point colors, magnification and symbols for the population and sample respectively |

`m.col` |
color for the horizontal line to denote the sample mean of Y |

`legend.loc` |
legend location: topleft, topright, bottomleft,
bottomright, ... (see |

`...` |
other arguments passed to |

From this demonstration we can clearly see that the ratio estimation is
generally better than the simple sample average when the ratio **R**
really exists, otherwise ratio estimation may not help.

A list containing

`X` |
X population |

`Y` |
Y population |

`R` |
population ratio |

`r` |
ratio calculated from samples |

`Ybar` |
population mean of Y |

`ybar.simple` |
simple sample mean of Y |

`ybar.ratio` |
sample mean of Y via ratio estimation |

Yihui Xie

Examples at https://yihui.org/animation/example/sample-ratio/

`sample`

, `sample.simple`

,
`sample.cluster`

, `sample.strat`

,
`sample.system`

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.