lohaub.blogg.se

F test in stata
F test in stata












f test in stata

We'll use the following four variables in the examples for this section: The GSS codes most of its binary variables as 1/2, so we'll need to create some new variables and change others to match what prtest is expecting. The prtest command assumes that the variables it will act on are binary (0/1) variables and the proportion of interest is the proportion of 1's. If you plan on applying what you learn directly to your homework, create a similar do file but have it load the data set used for your assignment.

f test in stata

Then create a do file called prtests.do in that folder that loads the GSS sample as described in Doing Your Work Using Do Files. If you plan to carry out the examples in this article, make sure you've downloaded the GSS sample to your U:\SFS folder as described in Managing Stata Files. We will discuss the interpretation of the proportion test in detail for the first type of hypothesis (that the proportion is equal to a specified value) but the discussion applies to all the hypotheses a t-test can test.

f test in stata

Looking at the results and then picking the alternative hypothesis that matches what you'd like to see will increase the probability of drawing the wrong conclusion from the test. Stata will report results for all three alternative hypotheses, but you should choose which one you're interested in ahead of time.

f test in stata

Your alternative hypothesis could then be one of the following: that the proportion of women with a bachelor's degree is higher than the proportion of men with a bachelor's degree, that the proportion of women with a bachelor's degree is different than the proportion of men with a bachelor's degree, or the proportion of women with a bachelor's degree is lower than the proportion of men with a bachelor's degree. For example, if you're investigating differences between men and women in the proportion that have earned a bachelor's degree, your null hypothesis will usually be that the proportions are the same. Usually the null hypothesis is the opposite of what you're really interested in. The final type of hypothesis we'll consider is whether two groups have the same proportions for a single variable.įor all these tests we've described the null hypothesis. The Population Proportions for Two Subsamples are the Same The Population Proportions for Two Variables are the SameĪnother type of hypothesis looks at whether two variables have the same proportions. One type of hypothesis simply asks whether the population proportion of a variable is equal to some particular value of interest. In this section we'll discuss the following types of tests: The Proportion in the Population is Equal to Some Specified Value The command to run one is simply prtest, but the syntax will depend on the hypothesis you want to test. Conceptually they are very similar to t-tests. Proportion tests allow you to test hypotheses about proportions in a population, such as the proportion of the population that is female or the proportion that answers a question in a given way. If you are new to Stata we strongly recommend reading all the articles in the Stata Basics section. This article is part of the Stata for Students series.














F test in stata