![]() ![]() ![]() If our p-value falls below a certain threshold, say 0.05, we will conclude our coin's behavior is inconsistent with that of a fair coin. We will judge significance by our p-value. We will then conduct a one-sample proportion test to see if the proportion of heads is significantly different from what we would expect with a fair coin. We will flip the coin a certain number of times and observe the proportion of heads. ![]() We wish to create an experiment to test this. Let's say we suspect we have a loaded coin that lands heads 75% of the time instead of the expected 50%. All of these are demonstrated in the examples below. There are also a few convenience functions for calculating effect size as well as a generic plot function for plotting power versus sample size. pwr.f2.test: test for the general linear model.: chi-squared test (goodness of fit and association).: two-sample t-tests (unequal sample sizes).pwr.t.test: two-sample, one-sample and paired t-tests.: two-sample proportion test (unequal sample sizes).pwr.2p.test: two-sample proportion test.Functions are available for the following statistical tests: All functions for power and sample size analysis in the pwr package begin with pwr. If you plan to use a two-sample t-test to compare two means, you would use the pwr.t.test function for estimating sample size or power. You select a function based on the statistical test you plan to use to analyze your data. Whatever parameter you want to calculate is determined from the others. If you want to calculate sample size, leave n out of the function. If you want to calculate power, then leave the power argument out of the function. The basic idea of calculating power or sample size with functions in the pwr package is to leave out the argument that you want to calculate. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |