This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
Note: this analysis was performed using the open source software R and Rstudio.
mydata <- read.csv("customer_segmentation.csv")
# we read the dataset using the read.csv function.
# we saved our original data as customer_segmentation.csv
# I suggest that you use the same document name
summary(lm(Consumption_Level ~., data = mydata))
##
## Call:
## lm(formula = Consumption_Level ~ ., data = mydata)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.30165 -0.49698 -0.03714 0.53914 1.08890
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -1.61920 2.64202 -0.613 0.5505
## Age 0.18192 0.21065 0.864 0.4035
## Gender 0.14248 0.38408 0.371 0.7166
## Ethnicity 0.45936 0.42434 1.083 0.2987
## Water_Frequency 0.25570 0.30650 0.834 0.4192
## Soda_Frequency 0.09736 0.20218 0.482 0.6381
## Tea_Frequency -0.08167 0.18321 -0.446 0.6631
## Coffee_Frequency 0.25460 0.12863 1.979 0.0693 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.7551 on 13 degrees of freedom
## Multiple R-squared: 0.5367, Adjusted R-squared: 0.2872
## F-statistic: 2.151 on 7 and 13 DF, p-value: 0.1106
#we use Consumption_Level as a dependent variable and all other variables as predictors.
# think about the dependent variables you will be using. This may require a little bit domain specific knowledge in marketing.