Hello,
I have created a summed scale of 2 dichotomous items coded originally 0 1.
The new variable now has values ranging from 0 to 2.
Since I am using a survey that I want to create summary measures
like non-self mean or non-self proportions that represent other members
of the respondents strata but excluding the respondent.
Eg. I would want to know the proportion of the respondents strata:
-- who hold no negative attitudes - ie 0 in the summed scale;
-- who hold only one of the negative attitudes, ie, 1 in the summed scale as
well as
-- those members of the strata who hold both negative values or 2 in the
summed scale.
Below are 20 cases, covering 3 different strata, as well as their respective
values on the index variable of interest (i.e., score), for your
examination. What I want
is the count or proportion of each value of the index variable (i.e., score)
in each strata.
Cluster Hhold# Line# Strata score
46 7 1 1 0
122 20 4 1 0
122 6 2 1 1
46 1 1 1 2
122 11 2 1 1
122 6 1 1 0
122 16 6 2 0
46 13 1 2 1
46 12 1 2 2
122 17 1 2 0
122 8 2 2 1
46 13 3 2 1
122 5 2 2 0
46 6 3 3 1
122 16 2 3 0
122 15 1 3 2
46 4 2 3 0
46 19 3 3 1
122 4 2 3 0
46 20 4 3 2
So from this scratch data we can have the following distribution of the 3
score values by strata:
ScoreValues Strata1 Strata2 Strata3 Total
0 3 3 3 9
1 2 3 2 7
2 1 1 2 4
N 20
Thus, we can state that across all strata 9 individuals had a score of 0, 7
had a score of 1 and 4 had a score of 2 -- that is we aggregate or count
each of the values of the index variable (Score) across or over all strata.
In this way I can describe the distribution of the scores over the strata.
I will be very grateful for any help in getting this programmed.
thanks - Cy
|
|
0
|
|
|
|
Reply
|
Yawo1964 (17)
|
11/20/2009 11:25:25 AM |
|
is this what you want?
data have;
input
Cluster Hhold Line Strata score;
cards;
46 7 1 1 0
122 20 4 1 0
122 6 2 1 1
46 1 1 1 2
122 11 2 1 1
122 6 1 1 0
122 16 6 2 0
46 13 1 2 1
46 12 1 2 2
122 17 1 2 0
122 8 2 2 1
46 13 3 2 1
122 5 2 2 0
46 6 3 3 1
122 16 2 3 0
122 15 1 3 2
46 4 2 3 0
46 19 3 3 1
122 4 2 3 0
46 20 4 3 2
;
run;
proc report data=have nowd;
column score Strata,N=N2 N=N1;
define score /group;
define strata/across;
define N2/'';
define N1/'total';
rbreak after /summarize;
run;
HTH
Yu
On Fri, Nov 20, 2009 at 5:25 AM, Chao Yawo <Yawo1964@yahoo.com> wrote:
> Hello,
>
> I have created a summed scale of 2 dichotomous items coded originally 0 1.
> The new variable now has values ranging from 0 to 2.
>
> Since I am using a survey that I want to create summary measures
> like non-self mean or non-self proportions that represent other members
> of the respondents strata but excluding the respondent.
>
> Eg. I would want to know the proportion of the respondents strata:
> -- who hold no negative attitudes - ie 0 in the summed scale;
> -- who hold only one of the negative attitudes, ie, 1 in the summed scale
> as
> well as
> -- those members of the strata who hold both negative values or 2 in the
> summed scale.
>
> Below are 20 cases, covering 3 different strata, as well as their
> respective
> values on the index variable of interest (i.e., score), for your
> examination. What I want
> is the count or proportion of each value of the index variable (i.e.,
> score)
> in each strata.
>
> Cluster Hhold# Line# Strata score
> 46 7 1 1 0
> 122 20 4 1 0
> 122 6 2 1 1
> 46 1 1 1 2
> 122 11 2 1 1
> 122 6 1 1 0
> 122 16 6 2 0
> 46 13 1 2 1
> 46 12 1 2 2
> 122 17 1 2 0
> 122 8 2 2 1
> 46 13 3 2 1
> 122 5 2 2 0
> 46 6 3 3 1
> 122 16 2 3 0
> 122 15 1 3 2
> 46 4 2 3 0
> 46 19 3 3 1
> 122 4 2 3 0
> 46 20 4 3 2
>
> So from this scratch data we can have the following distribution of the 3
> score values by strata:
>
> ScoreValues Strata1 Strata2 Strata3 Total
>
> 0 3 3 3 9
> 1 2 3 2 7
> 2 1 1 2 4
>
> N 20
>
> Thus, we can state that across all strata 9 individuals had a score of 0, 7
> had a score of 1 and 4 had a score of 2 -- that is we aggregate or count
> each of the values of the index variable (Score) across or over all strata.
> In this way I can describe the distribution of the scores over the strata.
>
> I will be very grateful for any help in getting this programmed.
>
>
> thanks - Cy
>
|
|
0
|
|
|
|
Reply
|
zhangyu05 (659)
|
11/20/2009 3:45:02 PM
|
|
A proc tabulate seems to work fine:
data xx;
input Strata score;
cards;
1 0
1 0
1 1
1 2
1 1
1 0
2 0
2 1
2 2
2 0
2 1
2 1
2 0
3 1
3 0
3 2
3 0
3 1
3 0
3 2
;
proc tabulate;
class strata score;
table score, strata*n=''*f=2. all*f=2. /rts=10;
run;
„ƒƒƒƒƒƒƒƒ…ƒƒƒƒƒƒƒƒ…ƒƒ�
‚ ‚ ‚A-‚
‚ ‚ Strata ‚ll‚
‚ ‡ƒƒ…ƒƒ…ƒƒˆƒƒ‰
‚ ‚1 ‚2 ‚3 ‚N ‚
‡ƒƒƒƒƒƒƒƒˆƒƒˆƒƒˆƒƒˆƒƒ‰
‚score ‚ ‚ ‚ ‚ ‚
‡ƒƒƒƒƒƒƒƒ‰ ‚ ‚ ‚ ‚
‚0 ‚ 3‚ 3‚ 3‚ 9‚
‡ƒƒƒƒƒƒƒƒˆƒƒˆƒƒˆƒƒˆƒƒ‰
‚1 ‚ 2‚ 3‚ 2‚ 7‚
‡ƒƒƒƒƒƒƒƒˆƒƒˆƒƒˆƒƒˆƒƒ‰
‚2 ‚ 1‚ 1‚ 2‚ 4‚
� ƒƒƒƒƒƒƒƒ‹ƒƒ‹ƒƒ‹ƒƒ‹ƒƒŒ
On Fri, 20 Nov 2009 06:25:25 -0500, Chao Yawo <Yawo1964@YAHOO.COM> wrote:
>Hello,
>
>I have created a summed scale of 2 dichotomous items coded originally 0 1.
> The new variable now has values ranging from 0 to 2.
>
>Since I am using a survey that I want to create summary measures
>like non-self mean or non-self proportions that represent other members
>of the respondents strata but excluding the respondent.
>
>Eg. I would want to know the proportion of the respondents strata:
>-- who hold no negative attitudes - ie 0 in the summed scale;
>-- who hold only one of the negative attitudes, ie, 1 in the summed scale
as
>well as
>-- those members of the strata who hold both negative values or 2 in the
>summed scale.
>
>Below are 20 cases, covering 3 different strata, as well as their
respective
>values on the index variable of interest (i.e., score), for your
>examination. What I want
>is the count or proportion of each value of the index variable (i.e.,
score)
>in each strata.
>
>Cluster Hhold# Line# Strata score
>46 7 1 1 0
>122 20 4 1 0
>122 6 2 1 1
>46 1 1 1 2
>122 11 2 1 1
>122 6 1 1 0
>122 16 6 2 0
>46 13 1 2 1
>46 12 1 2 2
>122 17 1 2 0
>122 8 2 2 1
>46 13 3 2 1
>122 5 2 2 0
>46 6 3 3 1
>122 16 2 3 0
>122 15 1 3 2
>46 4 2 3 0
>46 19 3 3 1
>122 4 2 3 0
>46 20 4 3 2
>
>So from this scratch data we can have the following distribution of the 3
>score values by strata:
>
>ScoreValues Strata1 Strata2 Strata3 Total
>
>0 3 3 3 9
>1 2 3 2 7
>2 1 1 2 4
>
>N 20
>
>Thus, we can state that across all strata 9 individuals had a score of 0, 7
>had a score of 1 and 4 had a score of 2 -- that is we aggregate or count
>each of the values of the index variable (Score) across or over all strata.
> In this way I can describe the distribution of the scores over the strata.
>
>I will be very grateful for any help in getting this programmed.
>
>
>thanks - Cy
|
|
0
|
|
|
|
Reply
|
ya.huang (1962)
|
11/20/2009 3:51:30 PM
|
|
|
2 Replies
137 Views
(page loaded in 0.114 seconds)
Similiar Articles: comp.soft-sys.sas - page 82This is page 82 of the comp.soft-sys.sas group which contains 53301 articles. How to write testbench file? - comp.lang.vhdl> Another approach is to write a self checking design. All of that non- synthesizable ... hi KJ, Do u mean that i can just create a testbench and then include ... crop - comp.soft-sys.matlabAre you going to then create a feature ... J= ust like the security system for self verification! Can u understand what i= mean? ... Cropping into round or irregular non ... Bug or wrong configuration? - comp.unix.solaris... it, the files inside it has owner UID a non-existent UID ... You mean that this happens only if i extract the files ... Or have the file_chown_self privilege in Solaris 10 (this ... Construct confidence interval for a p-value - comp.soft-sys.matlab ...... randi(N,[N,NRESAMPLE]); % Create the ... bootstrapping, you're trying to non ... intervals for the population proportion p using ... Confidence Interval for 'true mean': p ... SAS and SATA (arrays) on one controller (LSISAS1068)? - comp ...You mean: "Frank" <nospam@ (home of the braindead ... devices are configured at single devices, non-raid. If you create a ... 00, addr 1 uhub2: 2 ports with 2 removable, self ... Max # of files allowed in directory under UFS & under VxFS ...Just because you CAN do something doesn't mean you SHOULD ... I think in some release it was switched to a self ... 805 * If tvpp is non-null, return with the pointer to ... How to construct a transitive matrix from a general matrix? - comp ...... T)) T = R; R = R | R^2; end I assume you mean that ... all equal to one, with off-diagonal elements all non ... matrix as transitive multiplay matrix with its self and ... how to use script file in cmd line - comp.lang.awkNotice that I very carefully said "pre-GAWK", not "non ... regulated (which is to say: that they can morally self ... The Windows Command Prompt, known as ... also create a new ... How best to detect duplicate values in a column? - comp.databases ...Why not create one more table to contain survey definition? ... I don't know what you mean by "survey definition". ... its set of meta answers: S.questions TOTL SELF ... Creating a Non-Self Mean/Proportion - sas - Mofeel Groupssas, Creating a Non-Self Mean/Proportion . comp.soft-sys.sas - The SAS statistics package. st: RE: Creating a Non-Self Mean & ProportionsSince I am using a survey that I want to create summary measures like non-self mean or non-self ... hold no negative attitudes - ie 0 in the summed scale; the proportion ... 7/17/2012 4:54:38 AM
|