Showing posts with label 2013. Show all posts
Showing posts with label 2013. Show all posts

Wednesday, November 13, 2013

End-term updates

Hi all,

Update: R tutorial announcement:

22-Nov Friday 4-6 pm at AC8 LT (tentatively). Will get a venue confirmation and update here. Would be nice if every group is represented at the tutorial.

Sudhir

1. Exam related Cases:

There are two full-length cases in your course-pack: The 'Coop' case, and 'The Fashion Channel' case.

At least one of these two cases will feature in the end-term exam. I'd rather you not try to read the case for the first time in the exam hall. Pls read them at home beforehand.

Preferably, discuss them in a group on the lines of the following Qs:

  • What is the management problem? Describe also the major symptoms.
  • What are some of the likely decision problems (DPs) that emerge based on the management problem?
  • List a few research objectives (R.O.s) that emerge based on the DPs.

2. End-term exam pattern Notes

  • There are a total of 50 Qs, 2 marks each.
  • The Qs are broken down into 8 Question-sets, each having tables or figures and Qs based on them
  • The Qs are all short-answer - True/False, fill-in-the-blanks, write expression for ...., name these factors, type of stuff.
  • If any Q comes from any pre-read, the concerned pre-read will be specified in the Q itself. So bring your course-pack to the exam. Not all pre-reads are relevant, only the ones I've specifically asked you to read. Properly speaking, those pre-reads are a part of the course.
  • Nothing that was not covered in class will show up anywhere in the exam.
  • At least one question set relates to a full-length case (see above)
  • Time will not be a problem - you'll have 150 minutes for a 120 minute paper.

Pls use the comments section to this post for any Q&A so that it is visible to the class at large.

See you in class for our last classroom meeting. Any feedback you have on how to improve any aspect the course etc is welcome at any time.

3. R tutorial and R in your resume:

From the project point of view, if you want an R tutorial at anytime between now and 24-Nov (when I leave for Mohali), pls let me know. A quorom of minimum 5 people must signup for the tutorial which can go as technical as the attendees want. Ideally, one person from each project group would attend.

If you want to include R in your resume, then provided that you have made a good-faith attempt at installing and running R for your HWs, provided that you intend to continue to invest in R going forward and provided that you have been able to read the code sent and get a "sense" of the analysis, pls consider amending and using any relevant subset of the following (as applicable):

  • State what you have done w.r.t R:
  • Have developed a familiarity with the R environment
  • Have used R to apply and analyze a wide variety of Mktg Research tools (from structured hypothesis testing to text analytics and social media analysis)
  • Have gained some understanding of the flexibility and extensibility of the system (installing and using packages and interfaces with external repositaries)
  • Have analyzed a full credit course project on the platform
  • State what you will do going forward:
  • Intend to continue investing in and developing greater insights into the R platform
  • Are attracted by the low-cost, license-free unrestricted use terms and rapid-analysis capabilities of the open-source platform
  • Believe in R's promise of substantially expanding enterprise analytics capabilities while keeping a tight lid on costs
  • Believe in the philosophy of collaborative design, rapid rollout and innate scale-ability
  • Bottomline: are convinced of R's compelling cost/benefit calculus for delivering enormous value to the organization

Again, folks, ensure that *only* that subset that applies to you in a bona fide way is used for your statements of purpose, on the resume etc. Making false claims has a habit of coming back to bite you at inconvenient times.

Good luck for the exam and going fwd for the placements as well.

Sudhir

Tuesday, November 12, 2013

Session 9 Updates

Update:

Hi folks, pls install java on your machines. Needed for rJava and text analysis packages to run. Alos, you'll need to have a twitter account to use twitteR. Just saying.

Announcement 1:

Your practice exam is up on LMS. No solution will be provided. Expect a similar Q pattern in the end-term.

Announcement 2:

This famous article from Wired magazine 'The Long tail' by Chris Anderson is the reading for Session 10. Its an excellent article on a new economic paradigm enabled by technology. Pls read and come, I will discuss both the McKinsey article pre-read for Session 9 and this one in Session 10. Also, a pre-read quiz may be lurking round the corner...

********************************************

Hi all,

This is a hurried post, and will deal mainly with the HW part of session 9.

There are two parts to Session 9 HW. Part 1 deals with plain descriptive analysis of session 2 survey data. Part 2 involves extracting web data from amazon product reviews, and then analyzing it. Here we go:

HW part 1:

  • First ensure all the packages required are installed. If you're having trouble, given the paucity of time, run your HW off a friend's machine.
  • Open 'Session 9 HW part 1 R code.txt'.
  • Open excel file 's2 survey data for s9 HW.xls'.
  • The first worksheet 'Questions reference' gives the 4 Qs and associated Q numbers that you'd answered.
  • The second worksheet contains your data itself as 4 columns (one for each Q)
  • Copy paste and save each column's data on a notepad. Since survey data from websurveys routinely come in the form of .csv files, the point here is get you to go from .csv to .txt to R.
  • Read the notepad into R and run the relevant R codeon it
  • Make a corpus-level wordcloud and dendogram, see if any broad themes emerge from them. Write a few lines on these.
  • Repeat the exercise with the same code for the other 3 columns

HW part 2:

  • Open 'Session 9 HW part 2 R code.txt'.
  • Check the URL given in the code - does it work - what page opens on a browser?
  • Run the code given to extract the data from the webpage
  • Check is the saved data look OK etc
  • Now perfrom downstream analysis as given in the code sent.
  • Execute R code line by line reading the commentary given to get a sense of the analysis flow
  • Make a corpus-level wordcloud and dendogram, see if any broad themes emerge from them. Write a few lines on these.
  • Segment the reviewers.
  • Run sentiment analysis for positive and negative words by segment.
  • What themes emerge in the sentiment wordlcouds by segment? Are the segments distinct in their needs and focus?
  • Optional but additional points for trying: Install twitteR
  • Search for "xbox" on twitter. Collect some 100 tweets
  • Run descriptive analysis on the tweets.
  • Submission guidelines:
  • Paste the plots and your analysis on PPT and submit in the relevant dropbox.
  • Name the PPT session9HW_yourname.ppt
  • Title slide should contain your name and PGID
  • Submission deadline is this Thursday midnight.
Shall update this post as more info (e.g., queries regarding the project or the end-term) comes in. Watch this space.

Sudhir

Friday, November 8, 2013

Session 8 Updates

Hi all,

Session 8's two main topics - (i) Hypotheses formulation and testing, and (ii) basic (regression) modeling hasve been covered.

A recap of big picture session take-aways:

  • Assumptions, beliefs and conjectures about events of interest - the stuff of ideas, basically - underlie Hypotheses.
  • Its critical that the Null and alternate hypotheses be defined carefully so that they are present a mutually exclusive, exhaustive and logical range of events.
  • We make it hard to reject the Null (i.e. status quo) hypotheses to minimize false positives (also called the 'Type 1 error')
  • Tests of differences (t-tests, basically) and tests of association (chisquare tests, primarily) together account for a large proportion of MKTR hypothesis testing in pratice
  • Modeling underlies our every attempt to structure, order an interpret data.
  • Regression modeling is amongst the most common in practice due to its strengths, viz., prediction, description, control, existence and magnitude information, etc.
  • The principal regression variants - quadratic and higher order polynomial terms, log-log forms, interaction effects etc. - allow much flexibility in modeling dependence relations.
  • Last but not least, the ability to rapidly formulate and test conjectures as well as interpret regression modeling results - is a core (i.e. non-outsourceble) managerial skill.

OK, having beaten the drum on why Session 8's topics are relevant, interesting and important, let me proceed to explaining the Classwork examples we saw in Hypothesis testing.

1. Hypothesis Testing, Select classwork Examples:

Copy-paste the code below. Pls don't do it all at once, but a few lines at a time, after reading the descriptive comments (following the '#' symbol).

rm(list = ls()) # clear workspace

mydata = read.table(file.choose(), header=TRUE)
# 'core course pref data.txt'

attach(mydata) # allows us to call columns in mydata by name

head(mydata) # view top few rows, just in case

summary(mydata) # see summary of all cols

# t-test for differences

# Q: Does preference for INVA equal 4?

t.test(INVA, mu = 4) # t.test() is the core func

# Q: Does preference for INVA exceed 4?

t.test(INVA, mu = 4, alternative = "greater")

# Q: is pref for MGTO > GSB?

t.test(MGTO, GSB, alternative = "greater")

# Q: Did women prefer SAIT more than men did?

xf = SAIT[(male == 0)]
xm = SAIT[(male == 1)]
t.test(xf, xm, alternative = "greater")

# Q: Did men and women prefer SAIT equally?

t.test(xf, xm)

Upon running the above code, each t.test() statement will output results. I will examine only a few here.

The hypothesis being tested is shown in red font above as a commented question. The above example is a one-sample one-tailed test. R tells us what the alternative hypothesis is (in blue font), shows the mean of the quantity being tested and yields the p-value.

This is a 2-sample 1-tailed test. The result is again non-significant at 95%.

The above were tests of differences which deal with metric data. Next, look at a test of association that deal with relations between non-metric (i.e., nominal, ordinal or categorical) variables. [BTW, the two types of tests are connected. It is certainly possible to recast a test of difference as a test of association by changing the hypothsis and the form of the variables involved].

# Q: Are higher than avg workex people mainly male? engineers?

# make a yes/no out of 'workex'

hi.workex = (workex > mean(workex)); summary(hi.workex)

mytable = table(engineer, hi.workex) # build crosstab of counts

mytable; chisq.test(mytable) # chisq.test() is the func

mytable = table(male, hi.workex) # build crosstab of counts

mytable; chisq.test(mytable)

Only one illustrative result is shown here, below:

A few Qs had come up regarding the t and chisq distributions. Well, these distributions are sensitive to degrees of freedom, so they implicitly account for adjustments required due to changing sample sizes. Still, 'higher the sample size, better the inference' mantra always holds.

2. Regression Modeling, Beer classwork example:

Will discuss only the simple regression model results for beer dataset ('beer dataset.txt') here. Copy code below line by line and paste onto R console.

mydata = read.table(file.choose(),header=TRUE)

dim(mydata); summary(mydata) # view summary of variables

head(mydata) # view a few data rows

attach(mydata) # enables calling variables by name

summary(lm(volsold ~ # lm() is linear model func, volsold is Y

price + distbn+ promo+ adspend1 # Mktg mix variables

+factor(brand2) +bottle +light +amber +golden +lite +reg +sku.size # prod attributes

+ factor(month) )) # control variables, lm() closes

Upon running the data, we get the following results:

The table's columns are 'Estimate' == Coefficient, 'Std error' is, well, standard error, 't value' is the t-statistic computed as Estimate/Std error, and 'Pr(>|t|)' is the p-value.

Some things to note in the results (based on Qs received in class):

1. There are seven brands in the data but only six brand intercepts. The seventh, 'Amstel' is the reference brand and its coefficient is fixed to zero, a priori. Why does this happen? Why only 6 brands? Why fix one brand to zero - isn't that arbitrary?

2. Well, consider this: Suppose we had the gender in the X variables. We could have two columns - 'male' and 'female' represented with 1 and 0. But we can use only one of the two columns in the regression, not both, because male = 1-female and vice versa. In other words, the two columns are linearly dependent. Similarly, having the seventh brand in would make the right hand side of the above regression also linearly dependent and the analysis would not run at all.

3. Further, the reference brand is not arbitrary. Any brand can be chosen as reference and the other brand's coefficients would adjust accordingly. FOr example, if we make Miller the reference brand, then we simply add 3.872*10^4 to the coefficients of all the brands (including Amstel). Then Miller would go to zero and the other brands would have a value relative to Miller.

4. Given average values of the X variables, we can multiply them with the coefficient estimates and obtain the average Y value. This is called the predicted Y (or Y-hat). Similarly, we can manipulate some of the X variuables and compute the hypothetical Y-hat for that X-vector. This facility is a neat and powerful advantage of the regression modeling approach.

5. However, be careful and don't stretch predictions beyond the limits of the regression. For instance, just because 'Promotions' has a positive effect on sales doesn't mean that if we increase promotions to 1000x, we'll end up with 1000x times 1.188*10^2 (promotion-coefficient) in sales.... that's probably stretching the model way beyond its reasonable limits. 6. Can't reiterate enopugh how critical it is that tomorrow's managers in general and Mktg ones in particular be comfortable with the regression approach. Certainly expect an exam Q or two on this.

3. HW for Session 8:

Save the file 'feedback ratings.txt' and use the code given in 'session 8 HW R code.txt'. Solve the following Qs by interpreting analysis results:

Q1. Test of Differences: Test the hypotheses that Quant ratings are significantly (i) greater than quali ratings, (ii) greater than R ratings and (iii) about the same as overall ratings. Identify whether the tests you run are one-sample or two-sample, and one-tailed or two-tailed. Interpret the p-value for inference on significant differences.

For the next Q, do the following:

We now divide the sample into 3 groups - High, medium and low - where 'High' ratings are one standard deviation or more above the mean, 'Low' ratings are one stdev or more below the mean and the rest are in the 'Medium' zone. [I wrote a function in the code that'll do this part automatically]

Q2a. Test of Association: Suppose you conjecture that the people who rate Quant High (Low) also rate (i) R High (Low), (ii) the blog High (Low) and (iii) the HWs High (Low). Test this conjecture. Interpret the results.

Q2b. Some of the HWs are done on R and a lot of explanation for them can be found on the blog. Test the conjecture that folks who rate the HWs High (Low) also rate (i) the blog High (Low) and (ii) R High (Low).

Moving to the modeling section from the hypothesis testing one...

Q3. Basic Regression Modeling: Test the conjecture that overall rating is a function of the component ratings (for quant, quali, R, blog and HWs). Remember to first write a conceptual model that relates the variables by name, then write an econometric model with coefficients and the error term thrown in and then, finally, run the code.

Q3a. The overall test of significance (for the regression as a whole) is given by the F-statistic in the last line of output. Interpret whether the Y actually relates to the set of set of Xs chosen.

Q3b. The extent to which the X variables explain variation in Y is given by the multiple R squared. What is the extent of unexplained variation in Y in the above regression?

Q3c. Interpret the results (coefficients and inference) of the regression.

The following question is a variant of the regression model that uses only categorical variables in the RHS.

Q3d. Factor regression Modeling: Run a variant of the above regression model. Regress overall rating on the high/med /low categorization for the components ratings. That is, regress overall over quant1, quali1, R1 etc. Interpret the results.

Q3e. What practical implications arise for an instructor of MKTR from the above 2 regression results? What should he/she focus on and what should he/she de-emphasize? Is there sufficient information and evidence to warrant your conclusions? Write a few lines about this.

The relevant data and code files for transfer will be on LMS shortly. Dropbox will be up soon. Sorry about the delay in taking out this HW, am caught up making the exam paper.

The deadline is next week saturday, but as that'll be exam week, pls don't wait that long - finish it off, like, tomorrow and submit.

Sudhir

Session 7 Updates

Hi all,

Session 7 was about the Experimentation approach in MKTR. Some big picture insights:

  • Experiments are a very powerful confirmatory tool that can be applied in a variety of business situations.
  • Experiments are gaining widespread acceptability in business as the cost of conducting them drops and the benefits derived pile up (i.e., their ROI keeps rising)
  • The colloquial usage of the term 'experiment' often confuses people. In MKTR, and in the Research in general, 'true' experiments test treatment against an equivalent control group to cancel out extraneous effects.
  • Experiments rely on logical hypotheses and measurable outcomes.
  • While web-based and services firms were the first to leverage this powerful tool, product based firms are finally getting into the act - testing innovations big and small is now commonplace in even FMCG and engineering goods firms.
  • Many firms go with pseudo- or quasi- experiments when the exacting conditions required for a true experiment may not be justified under the cost/benefit calculations.

Admittedly this year, in general, am quite happy with my own time-management in class - most classes have had a fair amount in-class Q&A time and have tended to end on time. However, Session 7 was quite a bit rushed towards the second half and I felt the conjoint portion for once could certainly have doen with more time.

To make up, here's a lengthy, colloquial blog-post on how you may want to use metric conjoint analysis for your project, for example.

Suppose your project R.O. says:

R.O.- Find customers' atribute preferences for Breakfast Noodles

Since you're asked to find attribute preference (or attribute importance) in a bundle of attributes, this is a clear cut case for conjoint analysis application.

You determine through qualitative study that Breakfast noodles product has five key attributes along which people tend to evaluate it: (i)Price, (ii)PackSize, (iii)Brand, (iv)Whether there are special flavors or not and (v) whether it is 'vitamin fortified' or not. You can make the attributes and attribute levels table in Excelf or MEXL analysis thus:

Notice that while the attributes are clear cut, the use of "High", "medium/low" in the attribute levels is imprecise. Who knows how different respondents may view or understand it? Hence, if your product development and competition benchmarking is fairly advanced, then you should ideally put in hard numbers there as far as possible. For instance, see below:

Clearly, there are two vertically differentiated bundles {assuming people will generally tend to prefer a well-known international brand (Nestle) over a well-known Indian one ('Parle') over an unknown local one 'Desi'}

Now prepare a set of product bundles for respondents to evaluate. They shouldn't include the vertically differentiated bundles as far as possible, in order to better force trade-offs in the purchase decision. Say you choose 8 bundles to show:

The hard 'design' part is over, its time to program the Qs you have into a websurvey. The bundle rating questions may look like this in qualtrics:

Ensure the bundles are presented to respondents in randomized order to avoid (or rather, to average out) any order effects.

Like I mentioned in class, metric conjoint is practically obselete now. Firms have moved on to choice based conjoint (or, CBC) in which you would present a bouquet of bundle options in each 'choice task' (e.g. like the one below) and the respondent makes a binary choice - picks one bundle as most preferred in the bouquet. See below for how a CBC choice task might look like when programmed into a web survey:

In the above figure, I couldn't figure out how to get Qualtrics to have both the image and the multiple choice question together in one question, so I did them as separate questions and grouped them together.

Chalo, I hope that helps clarify the conjoint part of what is going on. Metric conjoint interpretation is fairly straightforward and MEXL help is quite good, I hear. Should you require specific assistance in interpreting conjoint results for your projects etc, pls let me know and we can go over it individually.

Sudhir

Wednesday, November 6, 2013

About the FGD Homework

Hi all,

Some quick news and views before I get to the FGD part:

1. On Session 7 Updates and Conjoint exercises:
  • Yesterday, in session 7, we covered an important and powerful MKTR tool - the Experimentation approach - and a famous special case - the conjoint experiment.
  • I ran into a bit of time trouble towards the end and felt that the Conjoint aspect (esp its MEXL implementation) could have done with some more time.
  • Hence, like I promised, a detailed write-up is coming up - on how one may use Metric conjoint in MEXL (for your projects perhaps?) to get to specific results and insights.
  • However, given that there's no HW for Session 7, that post'll have to wait till the weekend.

2.  On HW submissions and progress in general:
  • I and the AA are grading each HW component out of 10. This is an interim measure. After all the HWs are in, we'll normalize the scores and re-weight them to fit in with the HW % weight.
  • If you're interested in seeing your progress with respect to HW scores, kindly meet with the AA Mr Sreenath today during working hrs.
  • Any other concerns, queries etc you may have, pls feel free to write or talk to me (over the phone or in person).

3. Session 4 group HW - the FGD
  •  The group submission for the FGD piece has come in. I am going over the submissions and some interesting facets have come out.
  •  First off, great effort all, in pulling this off. A special mention to five teams: Disney, Nike, Fastrack, Brainjuicers and Happily unmarried - who also submitted snapshots/highlights of their FGD via Youtube links.
  • I think its worthwhile sharing these links (in no particular order) with the class and well, with the world.
Team Brainjuicer Arvind, Naveen, Richa and Swati have put up: https://www.dropbox.com/s/2pkkkhv440ci3sg/FGD-discussion1.mp4

Team Nike with members Srinayana, Apurv, Shaheer and Saptarshi have putup their link here: http://www.youtube.com/watch?v=uaDuMb6i7_o&feature=youtu.be

Team Fastrack with members Bharatam Shivaraman, Anubhuti, Piyush and Pragya have putup the link:  http://youtu.be/cOUNV8EUEcw

Team Disney with members Deepti, Shobit, Shweta and Vaishnavi have putup their FGD highlights here: http://www.youtube.com/watch?v=yjL6UgDEoFI&feature=youtu.be

Team Happily Unmarried with members Anant, Benjamin, Namrata and Sanjit have put up link: http://www.youtube.com/watch?v=RIvvthI1yEM
4. Some quick notes on the FGDs:
  • Not that I claim great expertise in FGD analysis, however, some things did become quite apparent even to my untrained eye.
  • The FGD relies and thrives on interactions among the panelists. Its a semi-unstructured 'discussion' and in the course of those interactions, sometimes, insight emerges.
  •  - Some of the FGDs I saw gave me the impression more of a dialogue between the Mod and the panelist rather than one among the panelists themselves.
  • Its not a big issue however - given the rather challenging FGD topic you had and the fact that many of you are probably running one for the first time - I'm happy that you as MKTR students have gotten first hand exposure to the challenges one faces in planning, running and analyzing FGDs.
  • I hope this exercise will serve to keep you more grounded, realistic and sceptical about claimed FGD insights than you would otherwise have been.


Alrite. That is all for now. Am busy going through some of the feedback you gave y'day and also busy prepping for tomorrow's R heavy class - "Hypothesis Testing and Modeling secondary data in MKTR".

See you in class tomorrow.

Sudhir
  



Sunday, November 3, 2013

Mailbag (Q&A upto Session 6)

Hi all,

Shall use this post to putup good Q&As that I received over email. Shall update as more Q&As come in (later ones to the top of the post). So do pls watch this space.

#####################################
I received this Q from Satish:

Dear Professor,
I had a couple of questions regarding the constructs and was wondering whether you could help me with them…
- When discussing the Pepsi’s challenge reading (session 2) you mentioned in the notes that ‘it is critical to clearly understanding the nature of the construct”. I was wondering what you meant by the nature of the construct?
- In the same slide, you mentioned that the it is critical to ensure that the measurement tool is aligned with the nature of the construct. But there is no description on how  to make sure that the measurement tool is aligned. Could you please elaborate on this?
Thanks
Satish
My response was as below:

Hi Satish,
I've prefaced your Qs with a ">>" below. My responses follow.

>> When discussing the Pepsi’s challenge reading (session 2) you mentioned in the notes that ‘it is critical to clearly understanding the nature of the construct”. I was wondering what you meant by the nature of the construct?

The context is whether Coke should go for a sip or central location test versus a 'home test' (whole can consumption experience). Pepsi's challenge frames the debate in terms of Pepsi's strengths and Coke falls for the gambit. IMO, what should have mattered more to Coke is what is it that connects people to COke, what is it that people find 'satisfying' in their entire soft drink consumption experience etc - as that ultimately had a larger sales impact that the sip/CLT test. So the "nature" of the construct alludes to the latent meaning of "consumption experience" or "consumption satisfaction". Coke reads the nature of teh construct they are looking for wrong. The example generalizes to other contexts as well.

>> In the same slide, you mentioned that the it is critical to ensure that the measurement tool is aligned with the nature of the construct. But there is no description on how  to make sure that the measurement tool is aligned. Could you please elaborate on this?

Well, there are no particular rules, only an intuitive understanding of general guidelines in this case. Point is that unless the 'nature' of the constructs was properly pinned down, the measurement tool used was always going to be measuring something other than what was required. In the caselet context, what should have been measured was how *all* consumption factors (including brand names rather than merely the blind test results) combined together in a home or natural consumption environment to produce satisfaction/ loyalty/ repurchase intention responses in the average target segment customer.

Well, I think the Q is important and timely. I'll putup the Q & A on the blog for further dissemination.

Sudhir


Happy Deepavali, Co2014

Have a safe and fun Diwali, folks.
-Sudhir

Friday, November 1, 2013

Session 6 Updates

Hi all,

Session 6 is done. We covered two main ways to map perceptual data - (i) using the attribute ratings (AR) method to create p-maps and joint-space maps (JSMs), and (ii) using the overall similarity (OS) approach to create multidimensional scaling (MDS) maps.We also saw some 101 stuff on positioning, definitional terms, common positioning startegies etc. The point was to get you thinking on how the mapping process could throw insights onto positioning in general, which strategy to adopt based on what criteria etc.

OK, next, what will follow is the code and snapshots of the plots that emerge from the classwork examples I did. Again, you are strongly encouraged to replicate the classwork examples at home. Copy-paste a only a few lines of code at a time after reading the comments next to each line of code. {P.S.- the statements following a '#' are for documentation purposes only and aren't executed}.So, without further ado, let us start right away:

##########################################

1. Simple Data Visualization using biplots: USArrests example.

We use USArrests data (inbuilt R dataset) to see how it can be visualized in 2 dimensions. Just copy-paste the code below onto the R console [Hit 'enter' after the last line]. Need to install package "MASS". Don't reinstall if you have already installed it previously. A package once installed lasts forever.

rm(list = ls()) # clear workspace

install.packages("MASS") # install MASS package

mydata = USArrests # USArrests is an inbuilt dataset

pc.cr = princomp(mydata, cor=TRUE) # princomp() is core func summary(pc.cr) # summarize the pc.cr object

biplot(pc.cr) # plot the pc.cr object

abline(h=0); abline(v=0) # draw horiz and vertical axes

This is what the plot should look like. Click on image for larger view.

2. Code for making Joint Space maps:

I have coded a user-defined function called JSM in R. You can use it whenever you need to make joint space maps provided just by invoking the function. All it requires to work is a perceptions table and a preference rating table. First copy-paste the entire block of code below onto your R console. Those interested in reading the code, pls copy-paste line-by-line. I have put explanations in comments ('#') for what the code is doing.

## --- Build func to run simple perceptual maps --- ##

JSM = function(inp1, prefs){ #JSM() func opens

# inp1 = perception matrix with row and column headers
# brands in rows and attributes in columns
# prefs = preferences matrix

par(pty="s") # set square plotting region

fit = prcomp(inp1, scale.=TRUE) # extract prin compts

plot(fit$rotation[,1:2], # use only top 2 prinComps

type ="n", xlim=c(-1.5,1.5), ylim=c(-1.5,1.5), # plot parms

main ="Joint Space map - Home-brew on R") # plot title

abline(h=0); abline(v=0) # build horiz and vert axes

attribnames = colnames(inp1);

brdnames = rownames(inp1)

# -- insert attrib vectors as arrows --

for (i1 in 1:nrow(fit$rotation)){

arrows(0,0, x1 = fit$rotation[i1,1]*fit$sdev[1],

y1 = fit$rotation[i1,2]*fit$sdev[2], col="blue", lwd=1.5);

text(x = fit$rotation[i1,1]*fit$sdev[1], y = fit$rotation[i1,2]*fit$sdev[2],

labels = attribnames[i1],col="blue", cex=1.1)}

# --- make co-ords within (-1,1) frame --- #

fit1=fitfit1$x[,1]=fit$x[,1]/apply(abs(fit$x),2,sum)[1]

fit1$x[,2]=fit$x[,2]/apply(abs(fit$x),2,sum)[2]

points(x=fit1$x[,1], y=fit1$x[,2], pch=19, col="red")

text(x=fit1$x[,1], y=fit1$x[,2], labels=brdnames, col="black", cex=1.1)

# --- add preferences to map ---#

k1 = 2; #scale-down factor

pref = data.matrix(prefs)# make data compatible

pref1 = pref %*% fit1$x[,1:2]for (i1 in 1:nrow(pref1)){

segments(0, 0, x1 = pref1[i1,1]/k1, y1 = pref1[i1,2]/k1, col="maroon2", lwd=1.25)

points(x = pref1[i1,1]/k1, y = pref1[i1,2]/k1, pch=19, col="maroon2")

text(x = pref1[i1,1]/k1, y = pref1[i1,2]/k1, labels = rownames(pref)[i1], adj = c(0.5, 0.5), col ="maroon2", cex = 1.1)}

# voila, we're done! #} # JSM() func ends

3. OfficeStar MEXL example done on R

Goto LMS folder 'Session 6 files'. The file 'R code officestar.txt' contains the code (which I've broken up into chunks and annotated below) and the files 'officestar data1.txt' and 'officestar pref data2.txt' contain the average perceptions or attribute table and preferences table respectively.

Step 3a: Read in the attribute table into 'mydata'.

# -- Read in Average Perceptions table -- #

mydata = read.table(file.choose(), header = TRUE)

mydata = t(mydata) #transposing to ease analysis

mydata #view the table read

# extract brand and attribute names #

brdnames = rownames(mydata);

attribnames = colnames(mydata)

Step 3b: Read into R the preferences table into 'prefs'.

# -- Read in preferences table -- #

pref = read.table(file.choose())

dim(pref) #check table dimensions

pref[1:10,] #view first 10 rows

Data reading is done. You should see the data read-in as in the figure above. We can start analysis now. Finally.

Step 3c: Run Analysis

# creating empty pref dataset

pref0 = pref*0; rownames(pref0) = NULL

JSM(mydata, pref0) # p-map without prefs information

The above code will generate a p-map (without the preference vectors). Should look like the image below (click for larger image):

However, to make true joint-space maps (JSMs), wherein the preference vectors are overlaid atop the p-map, run the one line code below:

JSM(mydata, pref)

That is it. That one function call executes the entire JSM sequence. The result can be seen in the image below.

Again, the JSM function is generic and can be applied to *any* dataset in the input format we just saw to make joint space maps from. Am sure you'll leverage the code for animating your project datasets. Let me or Ankit know in case any assistance is needed in this regard.

4. Session 2 survey Data on Core courses:

Lookup LMS folder 'session 6 files'. Save the data and code files to your machine. Data files are 'courses data.txt' for the raw data on perceptions and courses data prefs.txt' for the preference data with student names on it. Now let the games begin.

# read in data

mydata = read.table(file.choose()) # 'courses data.txt'

head(mydata)

# I hard coded attribute and brand names

attrib.names = c("will.recommend", "persp.change", "conceptual.value.add", "practical.relevance", "interest.sustained", "difficulty.level");

brand.names = c("GSB", "INVA", "MGTO", "SAIT")

Should you try using your project data or some other dataset, you'll need to enter the brand and attribute names for that dataset in the same order in which they appear in the dataset, separately as given above.I then wrote a simple function, titled 'pmap.inp()' to denote "p-map input", to transform the raw data into a brands-attributes average peceptions table. Note that the below code is specific to the first set of columns being the preferences data.

# construct p-map input matrices using pmap.inp() func

pmap.inp = function(mydata, attrib.names, brand.names){ #> pmap.inp() func opens

a1 = NULL

for (i1 in 1:length(attrib.names)){

start = (i1-1)*length(brand.names)+1; stop = i1*length(brand.names);

a1 = rbind(a1, apply(mydata[,start:stop], 2, mean)) } # i1 loop ends

rownames(a1) = attrib.names; colnames(a1) = brand.names

a1 } # pmap.inp() func ends

a1 = pmap.inp(mydata, attrib.names, brand.names)

And now, we're ready to run the analysis. First the p-mapo without the prefences and then the full JSM.

# now run the JSM func on data

percep = t(a1[2:nrow(a1),]); percep

# prefs = mydata[, 1:length(brand.names)]

prefs = read.table(file.choose(), header = TRUE) # 'courses data prefs.txt'

prefs1 = prefs*0; rownames(prefs1) = NULL # null preferences doc created

JSM(percep, prefs1) # for p-map sans preferences

Should produce the p-map below:

And the one-line JSM run:

JSM(percep, prefs) # for p-map with preference data

Should produce the JSM below:

Follow the rest of the HW code given to run segment-wise JSMs in the same fashion.

5. Running MDS code with Car Survey Data:

The code is in 'R code HW dataset JSMs.txt' in LMS folder 'session 6 files'. The data are in 'mds car data raw.txt'. Read them in and follow the instructions here.

# --------------------- #
### --- MDS code ---- ###
# --------------------- #

rm(list = ls()) # clear workspace

mydata = read.table(file.choose(), header = TRUE) # 'mds car data raw.txt'

dim(mydata) # view dimension of the data matrix

brand.names = c("Hyundai", "Honda", "Fiat", "Ford", "Chevrolet", "Toyota", "Nissan", "TataMotors", "MarutiSuzuki")

Note that I have hard-coded the brand names into 'brand.names' If you want to use this MDS code for another dataset (for your project, say) then you'll have to likewise hard-code the brand.names in.Next, I defined a function called run.mds() that takes as input the raw data and the brand names vector, runs the analysis and outputs the MDS map. Cool, or what..

### --- build user define func run.mds --- ###

run.mds = function(mydata, brand.names){

# build distance matrix # k = length(brand.names)

dmat = matrix(0, k, k)

for (i1 in 1:(k-1)){ a1 = grepl(brand.names[i1], colnames(mydata));

for (i2 in (i1+1):k){a2 = grepl(brand.names[i2], colnames(mydata));
# note use of Regex here

a3 = a1*a2;

a4 = match(1, a3);

dmat[i1, i2] = mean(mydata[, a4]);

dmat[i2, i1] = dmat[i1, i2] } #i2 ends

} # i1 ends

colnames(dmat) = brand.names;

rownames(dmat) = brand.names

### --- run metric MDS --- ###

d = as.dist(dmat)

# Classical MDS into k dimensions #

fit = cmdscale(d,eig=TRUE, k=2) # cmdscale() is core MDS func

fit # view results

# plot solution #

x = fit$points[,1];
y = fit$points[,2];

plot(x, y, xlab="Coordinate 1", ylab="Coordinate 2", main="Metric MDS", xlim = c(floor(min(x)), ceiling(max(x))), ylim = c(floor(min(y)), ceiling(max(y))), type="p",pch=19, col="red");

text(x, y, labels = rownames(fit$points), cex=1.1, pos=1);

abline(h=0); abline(v=0)# horiz and vertical lines drawn

} # run.mds func ends

Time now to finally invoke the run.mds func and get the analysis results:

# run MDS on raw data (before segmenting)

run.mds(mydata, brand.names)

The resulting MDS map looks like this:

OK, that's quite a bit now for classwork replication. Let me know if any code anywhere is not running etc due to any issues.

###################################

6. Session 6 HW:

This HW is also a group submission. You will need to co-operate with the rest of our group to get it done.

  • JSM based homework:
  • Collect basic demographic information about your group mates - #yrs of workex, previous industry, educational qualifications, intended major etc.
  • Run individual level JSM analysis on each of your team mates (and youself) using the code below (place appropriate name in student.name = c("") in that code)
  • Compare the JSMs you obtain - what salient similarities and differences do you see?
  • Now, using the demographic data you have collected, speculate on which demographic characteristics are best able to explain at least some of the similarities and differences you see.
  • Place (i) the 4 JSms, (ii) your list of salient similarities and differences (preferably in tabular form), (iii) the demographic profile of each group member (again, in tabular form) and (iv) the subset of demographic variables that best explain the JSMs in a PPT.
  • MDS based homework:
  • Construct individual level MDS maps for yourself and your group members.
  • Interpret them. In particular try to see what the axes might mean.
  • Interpret the clusters of similar brands (brands bunched close together) in terms of what characteristics are common among them.
  • Collate your (i) MDS plots, (ii) axes interpretation on each plot and (iii) similarity cluster interpretation on each plot into a PPT
  • Submit one PPT for both parts of your homework. Title slide should contain group name and member names + PGIDs. Name the slide as _session6HW.pptx

  • Note: If you don't find your name in the dataset, use a friend's observation (and demographic data) instead.
Use code below to draw individual level JSM plots:
student.name = c("Himanshu") # say, student's name is Himanshu
# retain only that row in the raw data which has name 'Himanshu'

mydata.test = mydata[(rownames(prefs) == student.name),]

# run the pmap.inp() func to build avg perceptions table

a1.test = pmap.inp(mydata.test, attrib.names, brand.names);

percep.test = t(a1.test[2:nrow(a1.test),]);

# introduce a small perturbation lest matrix not be of full rank
percep.test = percep.test + matrix(rnorm(nrow(percep.test)*ncol(percep.test))*0.01, nrow(percep.test), ncol(percep.test));

prefs.test = prefs[(rownames(prefs) == student.name),]; prefs.test

# run analysis on percep.test and prefs.test

JSM(percep.test, prefs.test)

Use code below to run individual level MDS plots. Just place the apropriate student.name and run.

student.name = c("Himanshu") #change student name as reqd
# retain only that row in raw data with name Himanshu

mydata.test = mydata[(rownames(mydata) == student.name),];

# run analysis and save result by copy pasting onto PPT

run.mds(mydata.test, brand.names)

HW deadline is 9-Nov Saturday midnight. That's it for now. Contact me with queries if any.Sudhir

Wednesday, October 30, 2013

Session 5 Updates

Hi all,
Yesterday in Session 5 we covered two major topics - Segmentation and Targeting. Sorry about the delay in bringing out this blog post.In this blog post, I shall lay out the classwork examples (which you might want to try replicating) and their interpretation, and the HW for this session.There are many approaches to doing cluster analysis and R handles a dizzying variety of them. We'll focus on 3 broad approaches - Agglomerative Hierarchical clustering (under which we will do basic hierarchical clustering with dendograms), Partitioning (here, we do K-means) and model based clustering. Each has its pros and cons. Model based is probably the best around, highly recommended.1. Cluster Analysis Data preparation
First read in the data. USArrests is pre-loaded, so no sweat. I use the USArrests dataset example throughout for cluster analysis.
#first read-in data#
mydata = USArrests
Data preparation is required to remove variable scaling effects. To see this, consider a simple example. If you measure weight in Kgs and I do so in Grams - all other variables being the same - we'll get two very different clustering solutions from what is otherwise the same dataset. To get rid of this problem, just copy-paste the following code.
# Prepare Data #

mydata = na.omit(mydata) # listwise deletion of missing

mydata = scale(mydata) # standardize variables

2. Now we first do agglomerative Hierarchical clustering, plot dendograms, split them around and see what is happening.

# Ward Hierarchical Clustering

d = dist(mydata, method = "euclidean") # distance matrix

fit = hclust(d, method="ward") # run hclust func

plot(fit)# display dendogram

Click on image for larger size.Eyeball the dendogram. Imagine horizontally slicing through the dendogram's longest vertical lines, each of which represents a cluster. Should you cut it at 2 clusters or at 4? How to know? Sometimes eyeballing is enough to give a clear idea, sometimes not. Various stopping-rule criteria have been proposed for where to cut a dendogram - each with its pros and cons. I'll go with subjective - visual criterion for the purposes of this course.

Suppose you decide 2 is better. Then set the optimal no. of clusters 'k1' to 2.

k1 = 2 # eyeball the no. of clusters

Note: If for another dataset, the optimal no. of clusters changes to, say, 5 then use 'k1=5' in the line above instead. Don't blindly copy-paste that part. However, once you have set 'k1', the rest of the code can be peacefully copy-pasted as-is.

# cut tree into k1 clusters

groups = cutree(fit, k=k1)# cut tree into k1 clusters

3. Coming to the second approach, 'partitioning', we use the popular K-means method. Again, the Q arises, how to know the optimal no. of clusters? Eyeballing the dendogram might sometimes help. But at other times, what should you do? MEXL (and most commercial software too) requires you to magically come up with the correct number as input to K-means. R does one better and shows you a scree plot of sorts that shows how the within-segment variance (a proxy for clustering solution quality) varies with the no. of clusters. So with R, you can actually take an informed call.

# Determine number of clusters #

wss = (nrow(mydata)-1)*sum(apply(mydata,2,var));

for (i in 2:15) wss[i] = sum(kmeans(mydata,centers=i)$withinss);

plot(1:15, wss, type="b", xlab="Number of Clusters", ylab="Within groups sum of squares")
# Look for an "elbow" in the scree plot #

Look for an "elbow" in the scree plot. The interior node at which the angle formed by the 'arms' is the smallest. This scree-plot is not unlike the one we saw in factor-analysis. Again, as with the dendogram, we get either 2 or 4 as the options available. Suppose we go with 2.
# Use optimal no. of clusters in k-means #

k1=2

Note: If for another dataset, the optimal no. of clusters changes to, say, 5 then use 'k1=5' in the line above instead. Don't blindly copy-paste that part. However, once you have set 'k1', the rest of the code can be peacefully copy-pasted as-is.
# K-Means Cluster Analysis

fit = kmeans(mydata, k1) # k1 cluster solution


To understand a clustering solution, we need to go beyond merely IDing which individual unit goes to which cluster. We have to characterize the cluster, interpret what is it that's common among a cluster's membership, give each cluster a name, an identity, if possible. Ideally, after this we should be able to think in terms of clusters (or segments) rather than individuals for downstream analysis.
# get cluster means

aggregate(mydata.orig,by=list(fit$cluster),FUN=mean)

# append cluster assignment

mydata1 = data.frame(mydata, fit$cluster);

mydata1[1:10,]

OK, That is fine., But can I actually, visually, *see* what the clustering solution looks like? Sure. In 2-dimensions, the easiest way is to plot the clusters on the 2 biggest principal components that arise. Before copy-pasting the following code, ensure we have the 'cluster' package installed.
# Cluster Plot against 1st 2 principal components
# vary parameters for most readable graph

install.packages("cluster")
library(cluster)
clusplot(mydata, fit$cluster, color=TRUE, shade=TRUE,labels=2, lines=0)

Two clear cut clusters emerge. Missouri seems to border the two. Some overlap is also seen. Overall, the clusPlot seems to put a nice visualization over the clustering process. Neat, eh? Try doing this with R's competitors...:)

4. Finally, the last (and best) approach - Model based clustering.'Best' because it is the most general approach (it nests the others as special cases), is the most robust to distributional and linkage assumptions and because it penalizes for surplus complexity (resolves the fit-complexity tradeoff in an objective way). My thumb-rule is: When in doubt, use model based clustering. And yes, mclust is available *only* on R to my knowledge.Install the 'mclust' package for this first. Then run the following code.

install.packages("mclust")

# Model Based Clustering

library(mclust)

fit = Mclust(mydata)

fit # view solution summary

The mclust solution has 3 components! Something neither the dendogram nor the k-means scree-plot predicted. Perhaps the assumptions underlying the other approaches don't hold for this dataset. I'll go with mclust simply because it is more general than the other approaches. Remember, when in doubt, go with mclust.

fit$BIC # lookup all the options attempted

classif = fit$classification # classifn vector

mydata1 = cbind(mydata.orig, classif) # append to dataset

mydata1[1:10,] #view top 10 rows

# Use below only if you want to save the output

write.table(mydata1,file.choose())#save output

The classification vector is appended to the original dataset as its last column. Can now easily assign individual units to segments.Visualize the solution. See how exactly it differs from that for the other approaches.

fit1=cbind(classif)
rownames(fit1)=rownames(mydata)
library(cluster)
clusplot(mydata, fit1, color=TRUE, shade=TRUE,labels=2, lines=0)
Imagine if you're a medium sized home-security solutions vendor looking to expand into a couple of new states. Think of how much it matters that the optimal solution had 3 segments - not 2 or 4.To help characterize the clusters, examine the cluster means (sometimes also called 'centroids', for each basis variable.
# get cluster means
cmeans=aggregate(mydata.orig,by=list(classif),FUN=mean); cmeans
Seems like we have 3 clusters of US states emerging - the unsafe, the safe and the super-safe. Now, we can do the same copy-paste for any other datasets that may show up in classwork or homework. I'll close the segmentation module here. R tools for the Targeting module are discussed in the next blog post. Any queries or comment, pls use the comments box below to reach me fastest.

###############################

Targeting in R

This is the code for classwork MEXL example "Conglomerate's PDA". This is the roadmap for what we are going to do:

  • First we segment the customer base using model based clustering or mclust, the recommended method.
  • Then we randomly split the dataset into training and test samples. The test sample is about one-third of the original dataset in size, following accepted practice.
  • Then we try to establish via the training sample, how the discriminant variables relate to segment membership. This is where we train the Targeting algorithm to learn about how discriminant variables relate to segment memberships.
  • Then comes the real test - validate algorithm performance on the test dataset. We compare prediction accuracy across traditional and proposed methods.
  • Since R is happening, there are many targeting algorithms to choose from on R. I have decided to go with one that has shown good promise of late - the randomForest algorithm. Where we had seen decision trees in Session 5, think now of 'decision forests' in a sense...
  • Other available algorithms that we can run (provided there is popular demand) are artificial neural nets (multi-layer perceptrons) and Support vector machines. But for now, these are not part of this course.
So without further ado, let me start right away.1. Segment the customer Base.To read-in data, directly save and use the 'basis' and 'discrim' notepads I have sent you by email. Then ensure you have packages 'mclust' and 'cluster' installed before running the clustering code.
# read-in basis and discrim variables
basis = read.table(file.choose(), header=TRUE)
dim(basis); basis[1:3,]
summary(basis)

discrim = read.table(file.choose(), header=TRUE)
dim(discrim); discrim[1:3,]
summary(discrim)

# Run segmentation on the basis.training dataset library(mclust) #invoke library

fit = Mclust(basis) # run mclust

fit # view result

classif = fit$classification

# print cluster sizes

for (i1 in 1:max(classif)){print(sum(classif==i1))}

# Cluster Plot against 1st 2 principal components

require(cluster)

fit1 = cbind(classif)

rownames(fit1)=rownames(basis)

clusplot(basis, fit1, color=TRUE, shade=TRUE,labels=2, lines=0)

The segmentation produces 4 optimal clusters. Below is the clusplot where, interestingly, despite our using 15 basis variables, we see decent separation among the clusters in the top 2 principal components directly.

Click on the above image for larger size.

2. Split dataset into Training & Test samplesRead in the dataset 'PDA case discriminant variables.txt' from LMS for the below analysis:

rm(list = ls()) # clear workspace

# 'PDA case discriminant variables.txt'

mydata = read.table(file.choose(), header=TRUE)

head(mydata)

# build training and test samples using random assignment

train_index = sample(1:nrow(mydata), floor(nrow(mydata)*0.65));

# two-thirds of sample is for training

train_index[1:10];

train_data = mydata[train_index, ];

test_data = mydata[-(train_index), ];

train_x = data.matrix(train_data[ ,c(2:18)]);

train_y = data.matrix(train_data[ ,19]);

# for classification we need as.factor

test_x = data.matrix(test_data[ ,c(2:18)]); test_y = test_data[ ,19]

Last year, when Targeting was a full lecture session, I used the most popular machine learning algorithms - neural nets, random forests and Support vector machines (all available on R, of course) to demonstrate targeting. Those notes can be found here.3. Use multinomial logit for Targeting:Will need to install library 'textir' for this one.

###### Multinomial logit using Rpackage textir #######

install.packages("textir")

library(textir)

covars = normalize(mydata[ ,c(2,4,14)], s=sdev(mydata[,c(2,4,14)])); #normalizing the data dd = data.frame(cbind(memb=mydata$memb,covars,mydata[ ,c(3,5:13,15:18)]));

train_ml <- dd[train_index, ];

test_ml = dd[-(train_index), ];

gg = mnlm(counts = as.factor(train_ml$memb), penalty = 1, covars = train_ml[ ,2:18]);

prob = predict(gg, test_ml[ ,2:18]);

head(prob);

pred = matrix(0, nrow(test_ml), 1);

accuracy = matrix(0, nrow(test_ml), 1);

for(j in 1:nrow(test_ml)){

pred[j, 1] = which.max(prob[j, ]);

if(pred[j, 1]==test_ml$memb[j]) {accuracy[j, 1] = 1}

}

mean(accuracy)

You'll see something like this (but not the exact same thing because the training and test samples were randomly chosen)

Look at the probabilities table given. The table tells us the probability that respondent 1 (in row1) belongs to segment 1, 2, 3 or 4. We get maximum probability for segment 1, so we say that respondent 1 belongs to segment 1 with a 61% probability. In some cases, the all the probabilities may be less than 50%. Just take the maximum and assign the respondent to that segment, if so.Now, we let loose the logit algorithm onto the test sample. the algo comes back with its predictions. In the real world, we will go by what the machine says. But in this case, since we have the actual segment memberships, we can validate the results. This is what I got when I tried to assess the accuracy of the algo's predictions:

So, the algo is able to predict with a 60% odd accuracy, not bad considering that random allocation would have given you at best a 25% success rate. Besides, this is simple logit - more sophisticated algos exist that can do better, perhaps even much better.

That's it for now. Will putup the HW for this session in a separate update (deadline now is 9-Nov saturday midnight) here (watch this space).

Session 5 HW update:

There will be no HW ofr session 5. I figure I can combine segmentation and targeting bits into the session 6 HW.

Sudhir

Some HW and Project related announcements

Hi all,
A few quick admin announcements follow, each separated by a line of hash tags. ###############################################Mailbag.I received the following email from a group today. My response is attached and is applicable to all groups in the class.
Hello Professor –
Our group has assignments lined up for tomorrow and a 2 hour pre-placement talk by Microsoft as well.
We would like to request you to postpone the focus group assignment submission to Friday morning if possible.Thanks,
A

My response:
Hi A,
I understand your schedules are very busy. I must point out that the HW was released a week ago.Granting your team an extension wouldn't be fair to other teams that have planned and prepared to meet the deadline on time.Hence, to find some middle-ground, I suggest you submit by Saturday noon by accepting a small points penalty. For instance, while we grade HWs out of 10 (later, will normalize and reweight), late submissions can be graded out of 8 or 9.I would rather folks submit late than not submit at all or push through a rush-job of suspect quality.I'll post this message on the blog to share with everybody.Regards,Sudhir






###############################################Re the project proposal submission.The project proposal submission presents a weird problem, something akin to a chicken-and-egg in that I'm asking you to plan your project even before you've been exposed to all the MKTR tools in the course.In particular, two tools of interest - perceptual mapping and text analytics - could easily find place in and add value to many of the project proposals that may get submitted by tomorrow.Hence, I would rather wait until you've been exposed to the rather powerful perceptual mapping tool before you rush to submit your project proposals [text analytics comes in only in session 9 and that's too long to wait for].Hence, your project proposal submission deadline has been extended to Saturday midnight - no harm, no foul.I'd rather your project be more thoughtful and directly applicable in business scenarios than would be possible with a constrained proposal in a rushed submission.Regards,Sudhir###############################################Re the External speaker:Mr Milind Chigupaker is a former IBM analyst who rose through the ranks to make it first to mid management and then to the opening rungs of senior management before he quit to focus on his own venture.I'm honored to be able to say, I'm a co-founder in the venture - Modak Analytics - that does (surprise, surprise) high-dimensional predictive analytics.The talk is set for 10-Nov Sunday 4-6 pm.Sudhir###############################################Re the Session 5 HW.Sorry about the delay in posting the HW. Henceforth, all HWs will be due on the Saturday of the following week. So, Session 5 HW will now be due by 9-Nov, midnight. I would however strongly encopurage folks to not wait till the 11th hour, if possible.Sudhir
























Saturday, October 26, 2013

Project Related Announcements - Proposal Template and Grading Criteria

Hi all,

Please find listed here a quick 5-7 slide template for submission of your project proposals on PPT. To recap, the project proposal PPT is due in its dropbox by the start of Session 6.

1. Slide 1 - Title Slide
Give the project an informative title and list the names & PGIDs of the team members working on it.
For example, for the problem statement we have in Session 2's construct mapping homework, we could give a title like "Assessing E-tailing's appeal among the young and upwardly mobile" or something like that.

2. Slide 2 - Management problem
Pls give a condensed problem statement describing the essential context of the management problem. For instance, the problem statement used for the questionnaire design homework can be used as a base. Further condense it as required to fit it comfortably onto one slide.
More generally, I would encourage teams to base their management problems on real world concerns. Pick up any business magazine or newspaper and chances are around 10% of the articles may describe problem contexts for specific firms or industries that you could modify and adapt for your project.

Here are a few articles I saw from which management problem contexts can be seen emerging:

(a) The appeal of 3D movies can lead to a survey estimating preference for -> willingness to pay for -> likely demand for movies in the 3D format among a particular target segment. Here's the management problem sourced from the Economist (July 2011) The appeal of 3D movies - Cinema's great hope


(b) Here's an interesting possibility that requires folks to look at reeeally new products - akin to forecasting email's effect on postal services in 1994 - the impact on small-scale manufacturing of 3D printing services. This too is sourced from the Economist (Dec 2011)

(c) Here's a desi innovation that might get a huge fillip in demand as demographics start to favor it. Demand soars for a "House-call doctor services" for the elderly and the chronically infirm. Source is Economic times, 2012.

(d) Here's an interview with the boss of the cafe coffee day chain and he describes some interesting looking initiatives CCD is taking in trying to leverage facebook and other social media to provide speedy feedback on CCD Ops nationwide etc.

And soon. These are merely a few examples. There's no dearth of good management problems to find.

3. Slide 3 - Decision problem
Condensing the management problem to a decision problem (D.P.) is tricky stuff, as we saw in Session 1. Make appropriate assumptions and achieve this step. State the decision problem chosen in clear words. If possible, list also a few alternative D.P. statements that were considered but not chosen.

4. Slide 4 - Research objectives (R.O.s)
Ensure your set of R.O.s "cover" the D.P. in that they address the central question(s) raised by the D.P. State the R.O. in the prescribed format (lookup session 1 slides for this).

5. Slide 5 - Tools mapping
Map the R.O.s onto particular MKTR tools (or sets of tools in a particular sequence). You can refer to the MKTR toolbox for starters but are free to choose tools from outside that toolbox as well. Just to be clear, "tools" here refers to methods or approaches being followed - e.g., the survey method, secondary analysis or experiments are all "MKTR tools" for us.

Important Note:
I understand that as the course progresses and you come in contact with newer tools, you may want to revise your propject proposal a bit here and there. Limited changes to the proposal are permissible. Further, you are free to take any one of the HWs you have done and build upon it, expand it to make your project out of it - perfectly fine. FYI.

*********************************************

In case you are wondering what the grading criteria may be for the project (as that might influence what project you finally choose), then let me outline some thoughts on these criteria based on what I have used in the past. These criteria are indicative only and are not exhaustive. However, they give a fairly good idea of what you can expect. Pls plan such that your chosen problem can yield enough material such that your deliverable of <30 6="" areas.="" before="" beginning="" br="" broad="" doesn="" due="" in="" lack="" of="" slides="" substance="" t="" term="" the="" these="">
(i) Quality of the management problem context chosen - How interesting, relevant, forward looking and do-able it is within the time and bandwidth constraints we are operating under, in the course.

(ii) Quality of the D.P.s chosen - How well it aligns with and addresses the business problem vaguely outlined in the project scope document; How well can it be resolved given the data at hand. Etc.

(iii) Quality of the R.O.s - How well defined and specific the R.O.s are in general; How well the R.O.s cover and address the D.P.s; How well they map onto specific analysis tools; How well they lead to specific recomemndations made to the client in the end. Etc.

(iv) Clarity, focus and purpose in the Methodology -  Flows from the D.P. and the R.O.s. Why you chose this particular series of analysis steps in your methodology and not some alternative. The methodology section would be a subset of a full fledged research design, essentially. The emphasis should be on simplicity, brevity and logical flow.

(v) Quality of Assumptions made - Assumptions should be reasonable and clearly stated in different steps. Was there opportunity for any validation of assumptions downstream, any reality checks done to see if things are fine?

(vi) Quality of results obtained - the actual analysis performed and the results obtained. What problems were encountered and how did you circumvent them. How useful are the results? If they're not very useful, how did you transform them post-analysis into something more relevant and useable.

(vii) Quality of insight obtained, recommendations made - How all that you did so far is finally integrated into a coherent whole to yield data-backed recommendations that are clear, actionable, specific to the problem at hand and likely to significantly impact the decisions downstream. How well the original D.P. is now 'resolved'.

(viii) Quality of learnings noted - Post-facto, what generic learnings and take-aways from the project emerged. More specifically, "what would you do differently in questionnaire design, in data collection and in data analysis to get a better outcome?".

(ix) Completeness of submission - Was sufficient info provided to track back what you actually did, if required - preferably in the main slides, else in the appendices? For instances, were Q no.s provided for the inputs to a factor analysis or cluster analysis exercise?  Were links to appendix tables present in the main slides? Etc.

(x) Creativity, story and flow - Was the submission reader-friendly? Does a 'story' come through in an interconnection between one slide and the next? Were important points highlighted, cluttered slides animated in sequence, callouts and other tools used to emphasize important points in particular slides and so on.

OK. Thats quite a lot already, don't want to spook anybody this early in the course (or later in the course, for that matter). However, let none say that they didn't know how the project would be viewed and graded before making their project proposals.

Sudhir

Thursday, October 24, 2013

Session 4 Updates for the Co2014 Hyderabad

Hi all,
Session 4 Big-picture Recap:
We're done with a readings-Heavy Session 4 'Qualitative Research' today. To recap the four big-picture take-aways from the session, let me use bullet-points:
  • We studied Observation Techniques - both of the plain vanilla observation (Reading 1 - Museums) and the 'immersive' ethnographic variety (Reading 2 - adidas).
  • We then ventured into deconstructing the powerful habit formation process and arrived a 3-step loop framework to describe it for Marketing purposes: cue-routine-reward.
  • We saw how the innovative combination of qualitative insight and predictive analytics can lead to windfall $$ profits (Reading 3-Target and reading 4-Febreze)
  • Finally we saw how unstructured respondent interaction personified by a focus group discussion (FGD) can be a powerful qualitative tool for digging up customer insights.
Session 4 HW details:Pls read the contemporary caselet given below, from last month's Economist magazine. It deals with a story on how to help professional chess gain fans. A sporting chance - how fans plan to revive Chess
IN LONDON in April, a 22-year-old Norwegian turned cartwheels by the Thames. Magnus Carlsen, the world’s top-ranked chess player (and a model for G-Star RAW, a fashion firm) had just earned the right to challenge for the World Chess Championship in India next month. His battle against Viswanathan Anand, a 43-year-old Indian and world champion since 2007, is a long-awaited spectacle. Match organisers see a chance to turn a struggling sport into a global brand.
Time was when the world stopped for professional chess. Millions watched Bobby Fischer, an American, beat the Soviet Union’s Boris Spassky in 1972. In the 1990s a pair of matches between Garry Kasparov and Deep Blue, a computer, recaptured some of that suspense. Yet despite booming interest in the amateur game, top-level chess has become obscure again, hobbled by squabbles and eccentric leadership.Enthusiasts spy a comeback. Last year Andrew Paulson, an American businessman based in London, bought rights to stage the game’s most prestigious contests, including November’s duel. For $500,000 the World Chess Federation (FIDE) granted Mr Paulson media and marketing licences for a decade—and the chance to make chess a profitable enterprise.The game itself has plenty of fans. Research in five countries by YouGov, a pollster, found that more than two-thirds of adults have played at least once. FIDE says 605m do so regularly. In India, where Mr Anand is a national hero, nearly a third of adults claim to play every week. The internet and smartphones mean novices no longer need a friend to play. Susan Polgar, a Hungarian-American grandmaster, says about 35 countries include chess in school curricula.But grassroots enthusiasm has not raised the profile of the professional game. Critics gripe about mercurial decision-making within FIDE. The sport’s governing body gets by on some $2m a year (FIFA, football’s federation, spent more than $1 billion in 2012) and has had only two presidents in 31 years.



So Mr Andrew paulson wants to do to world Chess what Kerry Packer did to world cricket, perhaps... The challenge clearly is to kickstart the virtuous cycle of more fans --> more advertiser interest --> more ad revenues --> more talent drawn in --> more competition --> more fans... How to get this cycle going is the Q. Clearly, the topic isn't as esoteric as it may first look. Football and Hockey in India suffer too from trying to kickstart this virtuous cycle in the shadow of big brother Cricket, for instance.The FGD then is partly a brainstorming session (from the firms' viewpoint) and partly an opining & evaluation (from a potential fan's viewpoint) of various possibilities. It may involve first trying to define what chess is or means to fans, what more it can come to represent, how to expand and leverage its present connect etc. Analogies with other sports such as cricket may come in as well, perhaps... I don't want to write more and bias the storylines you may come up with.
A deeper challenge is that watching chess is less fun than playing it. A single game can last six hours; its most riveting moment may be a strategic nuance known as the Yugoslav variation on the Sicilian. “Good chess leads to draws,” says Maurice Ashley, an American grandmaster.
Mr Ashley believes that new game and tournament formats could attract a wider audience. Competitors in blitz chess must finish their games in half an hour. Matches lasting minutes make popular footage online. Yet many players resist fast games, arguing that they reward low-quality chess. FIDE’s enthusiasm for shorter championships in the 1990s and 2000s prolonged the professional game’s split.Lengthy duels could still flourish if packaged well. Golf’s slow pace does not stop big audiences following four-day tournaments; in the cricket-playing world, witty commentary keeps fans tuned to games that last five days. Lately ESPN, a broadcaster, has turned poker, spelling bees and Frisbee-flinging (see article) into tense, dramatic television.Mr Paulson, who made a fortune in Russian internet ventures, says chess matches can make “heart-gripping, heart-pounding entertainment”. (He is standing for president of the English Chess Federation on October 12th.) He plans more competitions in big cities beyond Russia and eastern Europe, where many now take place. In March he launched ChessCasting, a web application that offers statistics and commentary on big events as well as discussion boards for amateur pundits. He talks of reporting competitors’ sweating, eye movement and heart rate.Chess needs deep-pocketed backers to complete this transformation. Mr Paulson thinks firms will want to associate with a game that is “clean, pure and meritocratic”. But he has not yet announced any big new sponsors. “One mistake has been assuming it would be easier,” he says. A cartwheeling world champion might help.



Submission format:
  • Title slide of your PPT should have your group name, member names and PGIDs
  • Next slide write your D.P. and R.O.(s) clearly.
  • Third slide, introduce the FGD participants and a line or so on why you chose them (tabular form is preferable for this)
  • Fourth Slide, write a bullet-pointed exec summary of the big-picture take-aways from the FGD
  • Fifth Slide on, describe and summarize what happened in the FGD
  • Note if unification and / or polarization dynamics happened in the FGD
  • Name your slide groupname_FGD.pptx and drop in the appropriate dropbox by the start of session 6
Any queries etc., pls feel free to email me.Update 1: FGD HW guidelines:A few more thoughts, guidelines on the FGD HW for this session. To keep it focussed and brief, lemme use the bullet-points format
  • The point of the FGD is *not* to 'solve' the problem, but merely to point a likely direction where a solution can be found. So don't brainstorm for a 'solution', that is NOT the purpose of the FGD.
  • Ensure the D.P. and R.O.s are aligned and sufficiently exploratory before the FGD can start. Different ROs lead to very different FGD outcomes. For example, if you define your R.o. as "Explore which advertising themes enable high levels of fan-connect" versus "Explore potential fan-connect across different chess formats", etc.
  • Keep your D.P. and R.O. tightly focussed, simple and do-able in a mini-FGD format. Having too broad a focus or too many sub-topics will lead nowhere in the 30 odd minutes you have.
  • Start broad: Given an R.O., explore how people connect with or relate to sports in general, their understanding of what constitutes a 'sports fan', their understanding of what constitutes 'excitement', memorability', 'social currency' or 'talkability' in a sport and so on. You might want to start with *sports* in general and not narrow down to chess right away (depending on the constructs you seek, of course).
  • Prep the moderator well: The moderator in particular has a crucial role. Have a broad list of constructs of interest, Focus on getting them enough time and traction (without being overly pushy). For example, the mod could start by asking the group: "What do you think connects people to sports?" and get the ball rolling, then steer it to keep it on course.
  • Converge on Chess in detail: After exploring sports in general, explore the particulars of chess as a sport - what is it, how is it viewed or understood, what is the perception of people who play or follow the game, how can it be made more trendy etc.
  • Do some background research on chess and its history first. Know what different game formats have been proposed and tried. E.g., apart from 'blitz chess', there is 'chess by jury' in which two groups of people individually vote for the best next move and the move with the highest votes is played on giant screens, etc.
  • See where people agree in general, change opinions on interacting with other people on any topic, disagree sharply on some topics and stand their ground etc.
  • In your PPT report, mention some of the broad constructs you planned to explore via the FGD.
  • Report (among other things) what directions seem most likely to be fruitiful for investigation.
External Speaker talk dates:Would've gone with next week Sunday after the midterms but its Diwali. Now I'm thinking of Friday 8-Nov, Sat 9-Nov or Sun 10-Nov Evening between 4 and 6 pm. If you have strong objections to this, pls let me know. Else I will pickup 10-Nov Sunday 4-6pm as the tentative date for the external speaker.Session 5 preview:We'll cover Segmentation and Targeting in session 5. This is both a theory and R heavy session. There'll be illustrative dummy examples as well as live exercises galore.That's it for now, more later.