Ancova with a fixed factor relevant only to a subset of data

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

Posts: 1
Joined: Sat Feb 06, 2016 4:46 pm

Ancova with a fixed factor relevant only to a subset of data

Postby weasel » Sat Feb 06, 2016 4:57 pm

Using SPSS v23 on WIndows 7.

Have a complex ANCOVA I want to run. An example to illustrate the question I have:

Suppose Strength is a function of age, gender (male/female) and, AMONG MALES, testosterone level (low, medium, or high). I don't care about testosterone levels in females, and those cells are blank for females in the data set.

If I were doing this through dummy coding, I would code this using four dummy variables to account for gender and testosterone level:

strength = B1(female) + B2(MaleLow) + B3(MaleMed) + B4(MaleHigh) +B5(age)

To ask if sex matters, I would test mean strength of females vs weighted average of the 3 male categories.
To test if testosterone level matters, I want to test the null hypothesis that the mean strength in the 3 male categories is equal.
To ask if age matters, a straightforward t-test seeing if B5 =0

Can I do this using GLM without having to manually dummy code everything? My concern is, if I put the categorical variable testosterone in the fixed factors, I am not sure how SPSS will handle it because this variable is only relevant to the male subset, and females all have missing values.
Also, how do I ask SPSS to test the specific hypothesis I am asking (if I'm correct, does B2=B3=B4, and does B1 = weighted average of B2,B3,B4)?
I have tried searching online--do I need to use the lmatrix or kmatrix subcommand (which I have not done before).

Thanks for the help.

Who is online

Users browsing this forum: No registered users and 1 guest