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(recommended ~., data = mydata))
##
## Call:
## lm(formula = recommended ~ ., data = mydata)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.8680 -0.3568 0.1236 0.3231 0.7438
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1.67221 2.88811 0.579 0.5785
## Gender 0.27835 0.46213 0.602 0.5636
## Age 0.29340 0.24488 1.198 0.2652
## Familiar 0.24460 0.18544 1.319 0.2237
## Why_Choose -0.18234 0.21314 -0.855 0.4172
## How_often 0.32404 0.23021 1.408 0.1969
## compare 0.09358 0.36213 0.258 0.8026
## favorite_thing -1.65187 0.66500 -2.484 0.0379 *
## least_favorite 0.07529 0.24915 0.302 0.7702
## perception 0.60908 0.52615 1.158 0.2804
## social_media -0.25769 0.35926 -0.717 0.4936
## taste_excellent 0.10544 0.45619 0.231 0.8230
## branding -0.06032 0.24902 -0.242 0.8147
## recommend -0.40235 0.47901 -0.840 0.4253
## price_reasonable -0.57230 0.32994 -1.735 0.1210
## repurchase 0.71680 0.45264 1.584 0.1519
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.784 on 8 degrees of freedom
## Multiple R-squared: 0.7536, Adjusted R-squared: 0.2916
## F-statistic: 1.631 on 15 and 8 DF, p-value: 0.2459
#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.