bangkokfere.blogg.se

Stata median
Stata median




stata median

To know the frequency and % of missing values use the option miss, e.g., To compute frequency distribution of CURRENT SMOKER click Statistics > Summaries, tables, and tests > Frequency tables > One-way table. In the Framingham dataset there are eight nominal (0/1, binary) and one ordinal variable. Qualitative variables can be described using Stata’s tabulate command. Statistics > Summaries, tables, and tests > Other tables > Compact table of summary statistics Let’s say we want to know the mean, median, standard deviation, and IQR of the age of participants stratified by gender. This Stata command is especially useful for stratified analysis. We can also use tabstat to summarize quantitative variables in a single table.

stata median

Tabstat– Compact table of summary statistics Whereas, standard deviation and IQR are called measures of variability or measures of dispersion. The mean, median, and mode are called measures of central location. The interquartile range (IQR=Q3-Q1) is 57-43 = 14. The output will appear in the Results Window. All statistics commands can be accessed from the Statistics menu located on top of the screen.ĭescriptive statistics for quantitative variables can be computed by clicking Statistics > Summaries, tables, and tests > Summary and descriptive statistics > Summary statistics. You can also use Stata’s graphical user interface (GUI) a.k.a point-and-click to execute commands. What if we want to know the median age of participants? You can get an expanded output by typing: The minimum age is 32 years and the maximum is 70 years. Mean age of participants is 49.9 years with a standard deviation of 8.6 years. The results of executing the command will appear in the Results Window. In the Command Window typeĪnd press the Enter or Return key to execute the command. Suppose we want to know mean age of study participants. Look at the codesheet in Table 1 and identify the type of variables: quantitative-continuous, quantitative-discrete, qualitative-nominal, or qualitative-ordinal. There are three Stata commands that are frequently used to describe data: summarize and tabstat to describe quantitative (continuous or discrete) variables and tabulateto describe qualitative/categorical (nominal or ordinal) data. Let’s run some descriptive statistics now. Press the Enter or Return key to execute the command. Now, browse the complete dataset by typing browse in the Command Window. Once the dataset is loaded all variables in the dataset will appear in the Variables Window. If you had not changed the working directory you would have to type the complete folder path in the Command Window to execute the Stata command. In the Command Window and press the Enter or Return key to execute (run) the command. Since you have already linked the Stata session to data folder, you can also load the dataset by typing Browse to the data folder, click on framingham.dta, and click Open. To open the Framingham dataset (framingham.dta) from the menu bar select File > Open.

stata median

Next, change the working directory (to link the Stata session to a folder) and create a log file. Now, you are going to open the Framingham dataset. Random, unique number for each participantĭeath from any cause over 24-year follow-upĬardiovascular disease over 24-year follow-upġ=Pre-hypertension 2=Stage 1 hypertension 3=Stage 2 hypertension The following table (codesheet) shows variable names, as they appear in the Stata dataset, along with brief descriptions and coding details for each variable.

STATA MEDIAN DOWNLOAD

Download the dataset and save it to the data folder. Details of the study, its design, data, and other information can be found at The Stata dataset is labeled framingham.dta. The Framingham Heart Study is a longitudinal study to assess risk factors for cardiovascular disease. To demonstrate descriptive statistics, I will use a subset of the data (n=3,000) collected in the Framingham Heart Study. Age, gender, race, income, systolic blood pressure, serum cholesterol, blood group are examples of variables. We measure characteristics of study subjects using variables. Descriptive statistics are used to describe data from a population or a sample.






Stata median