Intro to R
1
Three commands that were used in the video were:
1) plot(Age, LungCap, main=”Scatterplot”). This was used to obtain scatterplot, modeling the relationship between Age and Lung Capacity, with Lung Capacity being the Y variable (dependent variable) on the axis.
2) cor(Age, LungCap). This was used to calculate the Pearson’s correlation between the two variables.
3) attributes(mod). This command tells which particular attributes are stored in the object (the linear model).
2
Simple regression is a basic predictive analytical tool. It enables us to model and investigate the relationship between two variables: a dependent variable (outcome) and an independent variable (predictor). In the example from the tutorial, the variables were age (independent) and lung capacity (dependent).
One of the most crucial aspects of simple regression is the scatterplot. The command \\\\\\\'plot(Age, LungCap, main=”Scatterplot\\\\\\\")\\\\\\\' was used to create a visual representation of the data points on an XY-plane, giving us a quick overview of how the two variables might relate to each other. This is the first step in identifying potential relationships and trends.
The command \\\\\\\'cor(Age, LungCap)\\\\\\\' was then used to calculate the Pearson\\\\\\\'s correlation coefficient, which is a measure of the strength and direction of the association between the two variables. A correlation close to +1 indicates a strong positive relationship, whereas a correlation near -1 indicates a strong negative relationship.
Finally, the \\\\\\\'attributes(mod)\\\\\\\' command was used to retrieve the attributes stored in the linear model, providing specific details and nuances about the model, which are invaluable when interpreting the results and drawing conclusions.
How can simple regression be helpful to our organization? There are several ways simple regression can help an organization. It can help predict future trends or estimate the impact of changes in the independent variable on the dependent variable. It can help understand the relationship between variables, thereby helping to answer critical questions about cause and effect. If it can understand relationships, the organization can better allocate resources, prioritize efforts, and create more efficient strategies. Also, the statistical nature of simple regression makes it an excellent tool for evidence-based decision-making, reducing reliance on guesswork. Finally, it can help in forecasting and managing potential risks by understanding their relationships with various influencing factors.
3
You’re 79% through this paper. Sign up to read the full paper.
Sign Up Now — Instant Access Already a member? Log inAlways verify citation format against your institution’s current style guide requirements.