# Data Simulation in SPSS Syntax to Support Hypotheses

#### Sara.Hartigan

##### New Member
Hi All,

I was assigned a research paper where I have to create three independent variables (either categorical or continuous) and one continuous dependent variable. I am only allowed to analyze the data using a t-test, correlation, or one-way ANOVA in SPSS. Further, the simulated data must support the hypotheses. Different tests can be used on the data and it is a very straightforward analysis, I just cannot seem to simulate the data using conditional computes in syntax to support the hypotheses.

My IV's are as follows: Strength of Evidence (strong, weak, ambiguous) in Criminal Cases, Presence of a False Confession (present, absent), and Defendant Race (black, white). My DV is Guilt Rating in percentage form (0-100%). For the first IV, I will be using a one-way ANOVA, for the other two I will be using independent samples t-tests. All IV will be tested individually.

Every time I try to use an "IF" statement for the IVs in terms of guilt ratings, the tests all turn up non-significant. I copy and pasted an example of one IV below. Is there something that I am missing? Also, thank you in advance for any help!

COMPUTE EvidenceStrength=RND(RV.UNIFORM(1,3)).
IF (EvidenceStrength=2) GuiltRating=RND(RV.NORMAL(90,1)).
EXECUTE.
IF (EvidenceStrength=1) GuiltRating=RND(RV.NORMAL(29,1)).
EXECUTE.
IF (EvidenceStrength=3) GuiltRating=RND(RV.NORMAL(49,1)).
EXECUTE.

VALUE LABELS
EvidenceStrength
1 'Weak'
2 'Strong'
3 'Ambiguous'.

(I am just trying to confirm here that the strong case will result in the highest guilt ratings)

#### statsanon

##### New Member
COMPUTE EvidenceStrength=RND(RV.UNIFORM(1,3)).
IF (EvidenceStrength=2) GuiltRating=RND(RV.NORMAL(90,1)).
EXECUTE.
IF (EvidenceStrength=1) GuiltRating=RND(RV.NORMAL(29,1)).
EXECUTE.
IF (EvidenceStrength=3) GuiltRating=RND(RV.NORMAL(49,1)).
EXECUTE.

VALUE LABELS
EvidenceStrength
1 'Weak'
2 'Strong'
3 'Ambiguous'.

(I am just trying to confirm here that the strong case will result in the highest guilt ratings)
Hi

I ran this syntax and a one way ANOVA and obtained a significant result. However I had to create my cases first. Have you done that. The above syntax will not create your cases for you. It will populate values for existing cases.