Recently Published
Simple Linear Regression - Daniel J. Berg
This presentation demonstrates simple linear regression using the mtcars dataset to model the relationship between car weight and fuel efficiency. It includes model interpretation, regression and residual plots, and an interactive visualization to explore the data.
Testable Hypothesis Selection (Due 3/16)
Define variables:
1) Dependent variable (the outcome you are interested in) (x)
2) Independent variable(s) (the variables which you think affect the outcome) (y)
Define your hypotheses:
1) Null hypothesis - there is NO EFFECT of y on x
2) Alternative hypothesis - there is SOME EFFECT of y on x
Give me a few good paragraphs explaining your hypothesis and identifying your variables.
Simple Linear Regression
This a first try to Publish in RPubs to learn how to use the tool.
Homework – 4 (Due 3/23)
I believe I submitted the wrong HW - I was supposed to submit HW 4 which was due 3/23.
From the data you have chosen, select a variable that you are interested in
1. Use pastecs::stat.desc to describe the variable. Include a few sentences about what the variable is and what it's measuring.
3) Remove NA's if needed using dplyr:filter (or anything similar)
4) Provide a histogram of the variable (as shown in this lesson)
5) transform the variable using the log transformation or square root transformation (whatever is more appropriate) using dplyr::mutate or something similar
6) Provide a histogram of the transformed variable
7) submit via rpubs on CANVAS
Homework - 6
Assignment - HW #6
1) Load your chosen dataset into Rmarkdown
2) Select the dependent variable you are interested in, along with independent variables which you believe are causing the dependent variable
3) create a linear model using the "lm()" command, save it to some object
4) call a "summary()" on your new model
5) interpret the model's r-squared and p-values. How much of the dependent variable does the overall model explain? What are the significant variables? What are the insignificant variables?
6) Choose some significant independent variables. Interpret its Estimates (or Beta Coefficients). How do the independent variables individually affect the dependent variable?
7) Does the model you create meet or violate the assumption of linearity? Show your work with "plot(x,which=1)"
R 语言基础
R语言基础
Research Paper Data Selection
Missing from submitted HW for Research Paper Selection assignment.
Exploratory statistics and their commands:
1) summary(data$x)
2) hist(data$x) - for continuous variables
3) plot(data$x,data$y) - to compare variables
(ggplot is fine if you are comfortable with it)
4) cor(data$x,data$y) - to see a correlation between two variables
Simple Linear Regression
This presentation provides a comprehensive overview of Simple Linear Regression, covering both theoretical foundations and practical R implementation. Key topics include Ordinary Least Squares (OLS) estimation, interpreting the Coefficient of Determination R^2, and performing statistical inference on model coefficients. The slides also demonstrate how to validate model assumptions through residual diagnostics and provide a real-world example using study hours to predict exam scores.