![]() But we already know that these numerical tests are not very powerful, so it is convenient to complement this result with some graphic method. Since p> 0.05, we cannot reject the null hypothesis which, for this test, assumes that data are normally distributed. When we accept, the program gives us a statistic W = 0.99 with a value of p = 0.58. We open the menu Statistics-> Summaries-> Normality test… In the pop-up window we mark, for example, the Shapiro-Wilk test. We are going to check that they follow a normal distribution. The program also provides us with the median, the quartiles, the interquartile range, and the sample size. We see that our variable have a mean of 119.78 (we stay with 120) and a standard deviation of 11.83 (we stay with 12). ![]() We open the menu Statistics-> Summaries-> Numerical Summaries. We will only do a minimal numerical summary to verify that data are correct. We are not going to go into how to do the basic descriptive statistical study here. We already have our database, called “pas”, which we are going to assume is a record of the systolic blood pressure of 1000 adolescents. Notice that, in the name of the data set, we enter “pas”. To do this, we fill in the pop-up window as shown in the second figure. We are going to generate a sample of 1000 cases with a mean of 120, a standard deviation of 12 and, obviously, normally distributed. We go back to the Distributionsmenu, but this time we select Continuous Distributions-> Normal Distribution-> Sample from a normal distribution. This can also be done with the command set.seed(24814). In the pop-up window that appears we select, for example, 24814. Third, we select the menu option Distributions -> Set the seed of the random number generator. Second, we launch R-Commander with the library(Rcmdr) command. ![]() The problem is that the seed may be different in each R installation, so if you want to follow the examples in this post, the first thing is that we all establish the same seed.įirst we launch R. In practice we don’t care, they serve the same purpose for what we want. It must be said, first of all, that statistical programs do not generate random numbers, but pseudo-random numbers, performing calculations from a previous number that is usually referred to as the seed. On this occasion, we are going to make the data by generating a random distribution with R. It would be the results of our study that we would import from R to do the statistical study. Of course, to perform calculations on a data set, the first thing we are going to need is that data set. Although R has the advantages of being very powerful and totally free, its exclusive use from the command line can be a bit harsh for the uninitiated. We are going to carry out some examples of these calculations, using the R program and with the help of its R-Commander graphical interface. Although the density function of this probability distribution is rather unsympathetic, it is make up by the fact that the distribution can be characterized with only two parameters, its mean and its variance, with which we can perform multiple probability calculations. We already know that the normal distribution is one of the most used in biomedicine, since a large number of random variables follow this distribution. ![]() A series of examples of how to do probability calculations with a normal distribution are shown, as well as the advantages of standardizing the data. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |