* Encoding: UTF-8.

/* ############################################################### */
/* ONLY COMPLETE THESE STEPS ONCE! */
/* DATA CLEANING, RECODING */
/* ############################################################### */

COMPUTE DIFF_UrgeIntent_INDEX=PRE_UrgeIntent_INDEX-POST_UrgeIntent_INDEX.
EXECUTE.

COMPUTE DIFF_Urge=PRE_FeltUrge-POST_FeltUrge.
EXECUTE.

COMPUTE DIFF_Intent=PRE_PurchaseIntent-POST_PurchaseIntent .
EXECUTE.

COMPUTE PRE_UrgeIntent_INDEX=(PRE_FeltUrge+PRE_PurchaseIntent)/2.
EXECUTE.

COMPUTE POST_UrgeIntent_INDEX=(POST_FeltUrge+POST_PurchaseIntent)/2.
EXECUTE.

/* ############################################################### */
/*Correlations of main DVS and create INDEX variables.
/* ############################################################### */

CORRELATIONS
  /VARIABLES=PRE_FeltUrge PRE_PurchaseIntent
  /PRINT=TWOTAIL NOSIG
  /MISSING=PAIRWISE.

CORRELATIONS
  /VARIABLES=POST_FeltUrge POST_PurchaseIntent
  /PRINT=TWOTAIL NOSIG
  /MISSING=PAIRWISE.

/* ########################################### */
/* PRE-ANALYSIS -- EXCLUSION CRITERIA  / FILTER */ 
/* ########################################### */

/************MAIN FILTER********************************* */
/*EXCLUDE NON-COMPLETES +  SUBJECTS WHO PURCHASED PRODUCT */
/*MAIN SAMPLE TO USE FOR ANALYSIS */

USE ALL.
COMPUTE filter_$=((Part2_Complete = 1)  &  (Bought = 0)).
VARIABLE LABELS filter_$ '(Part2_Complete = 1)  &  (Bought = 0) (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

/* ########################################### */
/* ANALYSIS */
/* ########################################### */

/* **************************  */
/* DESCRIPTIVE STATS******************* */
/* **************************  */

FREQUENCIES VARIABLES=ProductSelected ImpulseBuyngFreq gender MaritalStatus education householdincome 
    Shopped Bought
  /HISTOGRAM
  /ORDER=ANALYSIS.

/*For multiple response variables education and race*/.
MULT RESPONSE GROUPS=$Employment (employment_full employment_part employment_outandlooking 
    employment_outandnotlooking employment_stayathomeparent employment_student employment_military 
    employment_retired employment_unabletowork employment_other (1))
  /FREQUENCIES=$Employment.

MULT RESPONSE GROUPS=$Race (race_white race_hispaniclatino race_nativeamerican race_asian 
    race_pacificislander race_other (1))
  /FREQUENCIES=$Race.

/* Descriptives for continuous variables */

DESCRIPTIVES VARIABLES=age 
  /STATISTICS=MEAN STDDEV MIN MAX.

FREQUENCIES VARIABLES=age
  /STATISTICS=MEDIAN
  /ORDER=ANALYSIS.

DESCRIPTIVES VARIABLES=ImpulseBuyngFreq
  /STATISTICS=MEAN STDDEV MIN MAX.

DESCRIPTIVES VARIABLES=TimeElapsed_Hours
  /STATISTICS=MEAN STDDEV MIN MAX.

GRAPH
  /HISTOGRAM=ImpulseBuyngFreq.

GRAPH
  /HISTOGRAM=TimeElapsed_Hours.

/* Descriptives for Felt Urge to Purchase and Purchase Intent */

DESCRIPTIVES VARIABLES= PRE_FeltUrge POST_FeltUrge PRE_PurchaseIntent POST_PurchaseIntent
  /STATISTICS=MEAN STDDEV MIN MAX.

GRAPH
  /HISTOGRAM=PRE_FeltUrge.

GRAPH
  /HISTOGRAM= PRE_PurchaseIntent.

GRAPH
  /HISTOGRAM=POST_FeltUrge.

GRAPH
  /HISTOGRAM=POST_PurchaseIntent.

/************************************************************.
*/ HYPOTHESIS TESTING: PAIRED T TESTS
/************************************************************.
/*main standard filter.
USE ALL.
COMPUTE filter_$=((Part2_Complete = 1)  &  (Bought = 0)).
VARIABLE LABELS filter_$ '(Part2_Complete = 1)  &  (Bought = 0) (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

/* FELT URGE ANALYSIS****************** */.
T-TEST PAIRS=PRE_FeltUrge WITH POST_FeltUrge (PAIRED)
  /CRITERIA=CI(.9500)
  /MISSING=ANALYSIS.

/* PURCHASE INTENT ANALYSIS****************** */.
T-TEST PAIRS=PRE_PurchaseIntent WITH POST_PurchaseIntent (PAIRED)
/CRITERIA=CI(.9500)
  /MISSING=ANALYSIS.

/* URGE/INTENT INDEX ANALYSIS****************** */.
T-TEST PAIRS=PRE_UrgeIntent_INDEX WITH POST_UrgeIntent_INDEX (PAIRED)
  /CRITERIA=CI(.9500)
  /MISSING=ANALYSIS.

* **************************  */
/* EXCLUDE SUBJECTS WHO SHOPPED BUT DID NOT BUY******************* */
/* **************************  */.

USE ALL.
COMPUTE filter_$=((Part2_Complete = 1)  &  (Bought = 0) & (Shopped = 0)).
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

/* FELT URGE ANALYSIS****************** */.
T-TEST PAIRS=PRE_FeltUrge WITH POST_FeltUrge (PAIRED)
  /CRITERIA=CI(.9500)
  /MISSING=ANALYSIS.

/* PURCHASE INTENT ANALYSIS****************** */.
T-TEST PAIRS=PRE_PurchaseIntent WITH POST_PurchaseIntent (PAIRED)
/CRITERIA=CI(.9500)
  /MISSING=ANALYSIS.

/* URGE/INTENT INDEX ANALYSIS****************** */.
T-TEST PAIRS=PRE_UrgeIntent_INDEX WITH POST_UrgeIntent_INDEX (PAIRED)
  /CRITERIA=CI(.9500)
  /MISSING=ANALYSIS.

* **************************  */
/* DIFFERENCES BY POSTPONEMENT PERIOD (time elapsed) ******************* */
/* **************************  */.

/*Standard filter, All Data N=164.
USE ALL.
COMPUTE filter_$=((Part2_Complete = 1)  &  (Bought = 0)).
VARIABLE LABELS filter_$ '(Part2_Complete = 1)  &  (Bought = 0) (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

/*predicting difference in URGE by time elapsed and impulse buying frequency.
REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT DIFF_Urge
  /METHOD=ENTER TimeElapsed_Hours.

/*predicting difference in INTENT by time elapsed and impulse buying frequency.
REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT DIFF_Intent
  /METHOD=ENTER TimeElapsed_Hours.

/* **************************  */
/* DIFFERENCES: Test for differences by product type******************* */
/* **************************  */
/*ONE-WAY ANOVAs.
ONEWAY DIFF_Intent BY ProductSelected
  /MISSING ANALYSIS.

ONEWAY DIFF_Urge BY ProductSelected
  /MISSING ANALYSIS.

/* **************************  */
/* Looking for individual differences (DV= difference in urge or intent)******************* */
/* **************************  */

/* median split of impulse buying frequency for t-test.
FREQUENCIES VARIABLES=ImpulseBuyngFreq
  /FORMAT=NOTABLE
  /STATISTICS=MINIMUM MAXIMUM MEAN MEDIAN
  /ORDER=ANALYSIS.

IF  (ImpulseBuyngFreq <2) ImpFreq_HighLow=0.
EXECUTE.
IF  (ImpulseBuyngFreq >2) ImpFreq_HighLow=1.
EXECUTE.

T-TEST GROUPS=ImpFreq_HighLow(0 1)
  /MISSING=ANALYSIS
  /VARIABLES= DIFF_Intent DIFF_Urge
  /CRITERIA=CI(.95).

/*testing other potential individual differences with change in intent or urge.  
  T-TEST GROUPS=gender(1 2)
  /MISSING=ANALYSIS
  /VARIABLES=DIFF_Intent DIFF_Urge
  /CRITERIA=CI(.95).

CORRELATIONS
  /VARIABLES=DIFF_Urge DIFF_Intent age ImpulseBuyngFreq householdincome TimeElapsed_Hours education
  /PRINT=TWOTAIL NOSIG
  /MISSING=PAIRWISE.

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT DIFF_Urge
  /METHOD=ENTER age ImpulseBuyngFreq education householdincome.

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN 
  /DEPENDENT DIFF_Intent
  /METHOD=ENTER age ImpulseBuyngFreq education householdincome.

/* ############################################################### */
/* END.
/* ############################################################### */