My Coding >
Software >
R >
Regression analysis >
Linear regression analysis with R
Linear regression analysis with R (Page: 1)Go to Page: In statistics, linear regression is a linear approach for modelling the relationship between a scalar response and one or more explanatory variables (also known as dependent and independent variables). Before data analysis, it is necessary to check our data, understand the format of this dataset and check for the quality, buy removing some information which is not useful for our purposes. For this analysis I will show how to use dplyr library. First of all you need to install this library, and then when you start R or rstudio it is necessary to load this library first library(dplyr) Overview of the datasetRead information about datasetSome datasets already have information about it’s content. In this case it is very usefull to use command help()
glimpse – simple overview columnsFor simple in formation about available columns, it is possible to use function glimpse()
Quick visualizing of the datasetIt is possible to overview these data by quickly displaying all data in the simple pair graphs
After executing these two lines you should have something like that:
NA – missed dataNext step of data analysis, is to check the absence for some data in the set. And if any data is missed it will have value NA  it is necessary to understand what will you do with this data, but this is a question for future investigations. To check the presence on NA use function anyNA() to all dataset or to any of its columns
As you can see, that the dataset have some NA data and further analysis reveals, that Ozone column have some missed data, but Wind column is completely full Filtering datasetsWe will remove all data with NA values from our dataset. For this we will pipe %>%our dataset to a new with filter() of NA data from Ozone column
And from now we will work with new dataset air SummaryNow, when dataset is cleaned from absent data, we can check it summary with command summary()

Last 10 artitles
9 popular artitles


© 2020 MyCoding.uk My blog about coding and further learning. This blog was writen with pure Perl and frontend output was performed with TemplateToolkit. 