I tried to figure out how I can analyze this project. To find out how to analyze relationships between prices and quantities. I think with only two variables you can't build models.
For example, one pencil company sells
100 pencils for 10 dollars, 200 for $15, 300 for $30, 400 for $35, etc/
How can you analyse this relationship in R?
Contents
hide
Best Answer
Assuming that the relationship is linear, you could do:
quantity <- c(100,200,300,400) price <- c(10,15,30,35) plot(quantity~price) fit <- lm(quantity~price) abline(fit) summary(fit)
Similar Posts:
- Solved – How to setup data properly for regression analysis to calculate price elasticity
- Solved – How to determine the correlation between 2 time series while controlling for a 3rd
- Solved – Correlation between spot and futures
- Solved – Linear Regression makes impossible predictions
- Solved – Instrumental variables regression Vs Linear Regression for price elasticity