Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use R to describe and statistics continuous data

Shulou Source: shulou.com Published: 2022-06-01 04:51:45 10月03日 Update

This article will explain in detail how to use R to describe the continuous data. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.

Using R to do basic description statistics, there are many optional functions, but it is not so direct. Just choose to learn a few useful ones that can meet the daily analysis needs.

Function usage

Comes with summary () pastecs package stat.desc ()

Case data

Employee employee data, download data free exercise.

Exercise 1

Describe the statistics of the whole data set.

Summary (employee)

Results:

Obviously this is not what we want, and some classified variables are not suitable for using the summary function.

Exercise 2

Specify a single variable for descriptive statistics

Summary (employee ["salary"])

Results:

Exercise 3

Specify multiple variables for descriptive statistics

Summary (employee [c ("salary", "salbegin")])

Results:

Exercise 4

Specify multiple variables for descriptive statistics

Stat.desc (employee [c ("salbegin", "salary")], norm = T)

Results:

The format of the stat.desc () function is: stat.desc (XMagneBasic true page0.95)

Where x is a data box or time series.

If basic=TRUE (the default), the number of all values, null values, missing values, as well as minimum, maximum, range, and sum are calculated. If desc=TRUE (default), the median, average, standard error of average, 95% confidence interval, variance, standard deviation, and coefficient of variation are calculated. If norm=F (default), normal distribution statistics are not returned, including skewness and kurtosis (and their statistical significance) and Shapiro-Wilk normal test results. On how to use R to describe the continuous data statistics is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Statistics data results variables functions averages content multiple articles more standards knowledge articles good significant maximum minimum discomfort freedom median Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Huawei Shulou Technology Microsoft MariaDB