R Markdown

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(Age ~ Preference, data = mydata))  
## Warning in summary.lm(lm(Age ~ Preference, data = mydata)): essentially perfect
## fit: summary may be unreliable
## 
## Call:
## lm(formula = Age ~ Preference, data = mydata)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -1.831e-15  0.000e+00  0.000e+00  0.000e+00  1.831e-15 
## 
## Coefficients:
##               Estimate Std. Error    t value Pr(>|t|)    
## (Intercept)  3.000e+00  5.854e-16  5.125e+15  < 2e-16 ***
## Preference  -1.831e-15  5.033e-16 -3.638e+00  0.00243 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 6.686e-16 on 15 degrees of freedom
## Multiple R-squared:  0.4848, Adjusted R-squared:  0.4505 
## F-statistic: 14.12 on 1 and 15 DF,  p-value: 0.001902
#we use CS_helpful as a dependent variable and all other variables except ID as predictors. 
# think about the dependent variables you will be using. This may require a little bit domain specific knowledge in marketing.