how do I create an additional group from 4 existing groups?

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

GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: how do I create an additional group from 4 existing grou

Postby GerineL » Tue Apr 22, 2014 9:38 am

in the uppper part of your syntax you forgot to put a point ( " . ") behind each if statement.
pregnancyhtn
Posts: 12
Joined: Wed Apr 09, 2014 6:28 am

Re: how do I create an additional group from 4 existing grou

Postby pregnancyhtn » Wed Apr 23, 2014 2:30 am

Ok, this is how the most recent syntax looks:

IF (pregnancyinducedhtnyorno = 1 & medicationyesorno = 1) combined = 1.
IF (pregnancyinducedhtnyorno = 1 & medicationyesorno = 0) combined = 2.
IF (pregnancyinducedhtnyorno = 0 & medicationyesorno = 1) combined = 3.
IF (pregnancyinducedhtnyorno = 0 & medicationyesorno = 0) combined = 4.
IF (anyformPETyesorno = 1) combined = 5.
EXECUTE.

Ive asked it to run the selection then ive tried doing a frequency of one of the variables and the data doesn't come out in groups
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: how do I create an additional group from 4 existing grou

Postby GerineL » Wed Apr 23, 2014 8:31 am

oke so what do you mean by "the data doesn't come out in groups"? what do you want your "data" / output to look like?
pregnancyhtn
Posts: 12
Joined: Wed Apr 09, 2014 6:28 am

Re: how do I create an additional group from 4 existing grou

Postby pregnancyhtn » Thu Apr 24, 2014 1:52 am

basically I want to compare the means of various variables across these 5 groups

at the moment the data just comes out as one group for the whole dataset when a mean of a variable is run with 'frequencies
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: how do I create an additional group from 4 existing grou

Postby GerineL » Fri Apr 25, 2014 9:55 am

if you want the frequencies separately per group, use split file
pregnancyhtn
Posts: 12
Joined: Wed Apr 09, 2014 6:28 am

Re: how do I create an additional group from 4 existing grou

Postby pregnancyhtn » Sat Apr 26, 2014 1:28 am

ok, ive used split file but I couldn't get these 5 groups as the final group is the 3rd variable and when it was put with the other 2 'groups' on the split file it made another 4 groups rather than just 1 group
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: how do I create an additional group from 4 existing grou

Postby GerineL » Mon Apr 28, 2014 8:01 am

Ok maybe you could just give a bit more detail about what it is you want to achieve exactly (maybe with an example?) because it seems like we keep misunderstanding each other.
pregnancyhtn
Posts: 12
Joined: Wed Apr 09, 2014 6:28 am

Re: how do I create an additional group from 4 existing grou

Postby pregnancyhtn » Mon Apr 28, 2014 11:20 am

Ok

for example:
the dataset has 500 entries. I want the results of the frequencies of the variable 'Age' to be outputted under 5 different groups. those 5 groups are the ones i've mentioned earlier. so then I also want to see the mean of 'Age' for each group and compare them to see if there are any significant differences

Hope that's clearer
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: how do I create an additional group from 4 existing grou

Postby GerineL » Mon Apr 28, 2014 12:00 pm

regarding this statement:
ok, ive used split file but I couldn't get these 5 groups as the final group is the 3rd variable and when it was put with the other 2 'groups' on the split file it made another 4 groups rather than just 1 group
could you maybe rephrase this, it is one long sentence now and I don't understand what goes wrong...

Who is online

Users browsing this forum: No registered users and 3 guests

cron