Ebook: R for Marketing Research and Analytics
We are here to help you learn R for marketing research and analytics.
R is a great choice for marketing analysts. It offers unsurpassed capabilities for
fitting statistical models. It is extensible and able to process data from many
different systems, in a variety of forms, for both small and large data sets. The R
ecosystem includes the widest available range of established and emerging statistical
methods and visualization techniques. Yet its use in marketing lags other fields
such as statistics, econometrics, psychology, and bioinformatics. With your help,
we hope to change that!
This book is designed for two audiences: practicing marketing researchers and
analysts who want to learn R and students or researchers from other fields who wish
to review selected marketing topics in an R context.
What are the prerequisites? Simply that you are interested in R for marketing, are
conceptually familiar with basic statistical models such as linear regression, and are
willing to engage in hands-on learning. This book will be particularly helpful to
analysts who have some degree of programming experience and wish to learn R. In
Chap. 1, we describe additional reasons to use R (and a few reasons perhaps not to
use R).
The hands-on part is important. We teach concepts gradually in a sequence across
the first seven chapters and ask you to type our examples as you work; this book is
not a cookbook-style reference. We spend some time (as little as possible) in Part I
on the basics of the R language and then turn in Part II to applied, real-world
marketing analytics problems. Part III presents a few advanced marketing topics.
Every chapter shows the power of R, and we hope each one will teach you
something new and interesting.
Specific features of this book are:
• It is organized around marketing research tasks. Instead of generic examples, we
put methods into the context of marketing questions.
• We presume only basic statistics knowledge and use a minimum of mathematics.
This book is designed to be approachable for practitioners and does not
dwell on equations or mathematical details of statistical models (although we
give references to those texts).
• This is a didactic book that explains statistical concepts and the R code. We
want you to understand what we’re doing and learn how to avoid common
problems in both statistics and R. We intend the book to be readable and to
fulfill a different need than references and cookbooks available elsewhere.
• The applied chapters demonstrate progressive model building. We do not present
“the answer” but instead show how an analyst might realistically conduct
analyses in successive steps where multiple models are compared for statistical
strength and practical utility.
• The chapters include visualization as a part of core analyses. We don’t regard
visualization as a standalone topic; rather, we believe it is an integral part of data
exploration and model building.
• You will learn more than just R. In addition to core models, we include topics
such as structural models and transaction analysis that may be new and useful
even for experienced analysts.
• The book reflects both traditional and Bayesian approaches. Core models are
presented with traditional (frequentist) methods, while later sections introduce
Bayesian methods for linear models and conjoint analysis.
• Most of the analyses use simulated data, which provides practice in the R
language along with additional insight into the structure of marketing data. If
you are inclined, you can change the data simulation and see how the statistical
models are affected.
• Where appropriate, we call out more advanced material on programming or
models so that you may either skip it or read it, as you find appropriate. These
sections are indicated by * in their titles (such as This is an advanced section*).
What do we not cover? For one, this book teaches R for marketing and does not
teach marketing research in itself. We discuss many marketing topics but omit
others that would repeat analytic methods. As noted above, we approach statistical
models from a conceptual point of view and skip the mathematics. A few specialized
topics have been omitted due to complexity and space; these include
customer lifetime value models and econometric time series models. In the R
language, we do not cover the “tidyverse” (Sect. 1.5) because it is an optional part
of the language and would complicate the learning process. Overall, we believe the
topics here represent a great sample of marketing research and analytics practice. If
you learn to perform these, you’ll be well equipped to apply R in many areas of
marketing.
Why are we the right teachers? We’ve used R and its predecessor S for a combined
35 years since 1997, and it is our primary analytics platform. We perform marketing
analyses of all kinds in R, ranging from simple data summaries to complex analyses
involving thousands of lines of custom code and newly created models.
We’ve also taught R to many people. This book grew from courses the authors have
presented at American Marketing Association (AMA) events including the
Academy of Marketing Analytics at Emory University and several years of the
Advanced Research Techniques Forum (ART Forum). As noted in our
Acknowledgements below, we have taught R to students in many workshops at
universities and firms. At last count, more than 40 universities used the first edition
in their marketing analytics courses. All of these students’ and instructors’ experiences
have helped to improve the book.
This second edition focuses on making the book more useful for students,
self-learners, and instructors. The code has proven to be very stable. Except for one
line (updated at the book’s Web site), all of the code and examples from the first
edition still work more than four years later. We have added one chapter, and
otherwise, the marketing topics and statistical models are the same as in the first
edition. The primary changes in this edition are:
• New exercises appear at the end of each chapter. Several of these use real-world
data, and there are example solutions at the book’s Web site.
• A new chapter discusses analysis of behavior sequences (Chap. 14) using
Markov chains. These methods are applicable to many sources of behavioral and
other data comprising sequences of discrete events, such as application usage,
purchases, and life events, as well as non-marketing data including physical
processes and genomic sequences. We use a published Web server log file to
demonstrate the methods applied to real data.
• Classroom slides are available for instructors and self-learners at the book’s
Web site. These include the slides themselves, the raw code that they discuss,
and Rmarkdown and LaTeX files that generate the slides and may be edited for
your own use.
• For our various data sets, we present additional details about how such data
might be acquired. For example, when a data set represents consumer survey
data, we describe how the data might be gathered and a brief description of
typical survey items.
• A new appendix describes options for reproducible research in R and explains
the basics of R Notebooks (Appendix B). R Notebooks are a simple yet powerful
way to create documents in R with integrated code, graphics, and formatted
text. They may be used to create documents as simple as homework exercises,
or as complex as final deliverable reports for clients, with output in HTML,
PDF, or Microsoft Word formats.
• We have updated other content as needed. This includes additional explanations,
code, and charts where warranted; up-to-date references; and correction of
minor errors.
R is a great choice for marketing analysts. It offers unsurpassed capabilities for
fitting statistical models. It is extensible and able to process data from many
different systems, in a variety of forms, for both small and large data sets. The R
ecosystem includes the widest available range of established and emerging statistical
methods and visualization techniques. Yet its use in marketing lags other fields
such as statistics, econometrics, psychology, and bioinformatics. With your help,
we hope to change that!
This book is designed for two audiences: practicing marketing researchers and
analysts who want to learn R and students or researchers from other fields who wish
to review selected marketing topics in an R context.
What are the prerequisites? Simply that you are interested in R for marketing, are
conceptually familiar with basic statistical models such as linear regression, and are
willing to engage in hands-on learning. This book will be particularly helpful to
analysts who have some degree of programming experience and wish to learn R. In
Chap. 1, we describe additional reasons to use R (and a few reasons perhaps not to
use R).
The hands-on part is important. We teach concepts gradually in a sequence across
the first seven chapters and ask you to type our examples as you work; this book is
not a cookbook-style reference. We spend some time (as little as possible) in Part I
on the basics of the R language and then turn in Part II to applied, real-world
marketing analytics problems. Part III presents a few advanced marketing topics.
Every chapter shows the power of R, and we hope each one will teach you
something new and interesting.
Specific features of this book are:
• It is organized around marketing research tasks. Instead of generic examples, we
put methods into the context of marketing questions.
• We presume only basic statistics knowledge and use a minimum of mathematics.
This book is designed to be approachable for practitioners and does not
dwell on equations or mathematical details of statistical models (although we
give references to those texts).
• This is a didactic book that explains statistical concepts and the R code. We
want you to understand what we’re doing and learn how to avoid common
problems in both statistics and R. We intend the book to be readable and to
fulfill a different need than references and cookbooks available elsewhere.
• The applied chapters demonstrate progressive model building. We do not present
“the answer” but instead show how an analyst might realistically conduct
analyses in successive steps where multiple models are compared for statistical
strength and practical utility.
• The chapters include visualization as a part of core analyses. We don’t regard
visualization as a standalone topic; rather, we believe it is an integral part of data
exploration and model building.
• You will learn more than just R. In addition to core models, we include topics
such as structural models and transaction analysis that may be new and useful
even for experienced analysts.
• The book reflects both traditional and Bayesian approaches. Core models are
presented with traditional (frequentist) methods, while later sections introduce
Bayesian methods for linear models and conjoint analysis.
• Most of the analyses use simulated data, which provides practice in the R
language along with additional insight into the structure of marketing data. If
you are inclined, you can change the data simulation and see how the statistical
models are affected.
• Where appropriate, we call out more advanced material on programming or
models so that you may either skip it or read it, as you find appropriate. These
sections are indicated by * in their titles (such as This is an advanced section*).
What do we not cover? For one, this book teaches R for marketing and does not
teach marketing research in itself. We discuss many marketing topics but omit
others that would repeat analytic methods. As noted above, we approach statistical
models from a conceptual point of view and skip the mathematics. A few specialized
topics have been omitted due to complexity and space; these include
customer lifetime value models and econometric time series models. In the R
language, we do not cover the “tidyverse” (Sect. 1.5) because it is an optional part
of the language and would complicate the learning process. Overall, we believe the
topics here represent a great sample of marketing research and analytics practice. If
you learn to perform these, you’ll be well equipped to apply R in many areas of
marketing.
Why are we the right teachers? We’ve used R and its predecessor S for a combined
35 years since 1997, and it is our primary analytics platform. We perform marketing
analyses of all kinds in R, ranging from simple data summaries to complex analyses
involving thousands of lines of custom code and newly created models.
We’ve also taught R to many people. This book grew from courses the authors have
presented at American Marketing Association (AMA) events including the
Academy of Marketing Analytics at Emory University and several years of the
Advanced Research Techniques Forum (ART Forum). As noted in our
Acknowledgements below, we have taught R to students in many workshops at
universities and firms. At last count, more than 40 universities used the first edition
in their marketing analytics courses. All of these students’ and instructors’ experiences
have helped to improve the book.
This second edition focuses on making the book more useful for students,
self-learners, and instructors. The code has proven to be very stable. Except for one
line (updated at the book’s Web site), all of the code and examples from the first
edition still work more than four years later. We have added one chapter, and
otherwise, the marketing topics and statistical models are the same as in the first
edition. The primary changes in this edition are:
• New exercises appear at the end of each chapter. Several of these use real-world
data, and there are example solutions at the book’s Web site.
• A new chapter discusses analysis of behavior sequences (Chap. 14) using
Markov chains. These methods are applicable to many sources of behavioral and
other data comprising sequences of discrete events, such as application usage,
purchases, and life events, as well as non-marketing data including physical
processes and genomic sequences. We use a published Web server log file to
demonstrate the methods applied to real data.
• Classroom slides are available for instructors and self-learners at the book’s
Web site. These include the slides themselves, the raw code that they discuss,
and Rmarkdown and LaTeX files that generate the slides and may be edited for
your own use.
• For our various data sets, we present additional details about how such data
might be acquired. For example, when a data set represents consumer survey
data, we describe how the data might be gathered and a brief description of
typical survey items.
• A new appendix describes options for reproducible research in R and explains
the basics of R Notebooks (Appendix B). R Notebooks are a simple yet powerful
way to create documents in R with integrated code, graphics, and formatted
text. They may be used to create documents as simple as homework exercises,
or as complex as final deliverable reports for clients, with output in HTML,
PDF, or Microsoft Word formats.
• We have updated other content as needed. This includes additional explanations,
code, and charts where warranted; up-to-date references; and correction of
minor errors.
Download the book R for Marketing Research and Analytics for free or read online
Continue reading on any device:
Last viewed books
Related books
{related-news}
Comments (0)