How to Extract p-values from multiple simple linear regression models

Sometimes you might fit many simple linear regression models and would like to extract p-values from each model. In this tutorial, we will learn two approaches to extract p-values from multiple simple linear regression models built in R. We will first use for loop to build and extract pvalue from multiple linear models and then… Continue reading How to Extract p-values from multiple simple linear regression models

How to extract residuals from a linear regression model

In this tutorial, we will learn how to extract residual values from a linear regression model in R. Residuals are values that is remaining after adjusting or subtracting effects of variable in the model. We will see two approaches to pull residuals from linear regression model result we get after using lm() function. First we… Continue reading How to extract residuals from a linear regression model

How to get p-value from linear regression model

In this tutorial, we will learn how to extract p-value from a linear regression fit object in R. We will use two approaches to pull out p-value and other statistics of interest from a linear regression model. First we will extract the p-value directly from summary of the linear regression fit object using coefficients argument.… Continue reading How to get p-value from linear regression model

ls() in R: list objects/variables in your environment

Often while working in R, you might want to check your environments for all the objects you have created and available in your environment. ls() function in R lists the objects in your environment as a vector. In this tutorial, we will learn the use of ls() functions with examples. In addition to ls() function,… Continue reading ls() in R: list objects/variables in your environment

duplicated() function in R: Find duplicated elements in a vector or dataframe

In this tutorial, we will learn about the base R function duplicated() and how can we use duplicated() function to find if an element in a vector is duplicated or a row in a dataframe is duplicated. duplicated() function can take a vector, matrix or a dataframe as input and give us boolean or logical… Continue reading duplicated() function in R: Find duplicated elements in a vector or dataframe

Exit mobile version