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

Computes a one-sample or two-sample t-test for data from a complex survey design with usage of plausible values.

1 | ```
svyPVttest(formula, design, placeholder = 1:10)
``` |

`formula` |
Formula, outcome~group for two-sample, outcome~0 or outcome~1 for one-sample (all variables have to be part of a survey design objecct created by the survey package). For a notation description for the plausible values see in 'details'. |

`design` |
a survey design which was generated by the |

`placeholder` |
a vector of symbols, which were used for numbering the plausible values. For a detailed description see in 'details'. |

All variables mentioned in the formula object must be part of the survey design object. Instead of the symbols, which were used for numbering the plausible values use '..' as notation (e.g. placeholder = 1:5 and PVLIT.. stands for PVLIT1, PVLIT2, PVLIT3, PVLIT4, PVLIT5). Missing values are deleted listwise.

The function returns a list, which includes the following three dataframes.

`DESC` |
Shows mean and SE for each group. |

`TEST` |
Shows the test statistic (t.value, degf and Pr.t). |

`N` |
Shows the unweighted number of cases and the sum of weights (NA's excluded) within each group. |

Jakob Peterbauer

Lumley, T. (2010). *Complex Surveys*. Hoboken, NJ: Wiley.

Saerndal, C.-E. & Swensson, B. & Wretman, J. (1992). *Model Assisted Survey Sampling*. New York: Springer.

Chaudhuri, A. & Stenger, H. (2005). *Survey Sampling. Theory and Methods*. Boka Raton, FL: Chapman & Hall/CRC.
.

1 2 3 4 | ```
data(svy_example1)
res <- svyPVttest(plaus.. ~ sex, svy.exrep, placeholder = 1:3)
res
``` |

```
Loading required package: survey
Loading required package: grid
Loading required package: Matrix
Loading required package: survival
Attaching package: 'survey'
The following object is masked from 'package:graphics':
dotchart
$DESC
sex plaus1 se
m m 298.7827 2.098256
w w 330.8806 2.551975
$TEST
t.value degf Pr.t
12.20269 98 < 2.22e-16
$N
m w
number.of.cases 50.0 50.0
sum.of.weights 8526.8 8588.9
```

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.