Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use R to describe and statistics continuous data

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report