COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Creating a Non-Self Mean/Proportion

• Email
• Follow

```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

See related articles to this posting

```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
160 Views

Similar Articles

12/11/2013 12:34:26 PM
[PageSpeed]

Similar Artilces:

Non-linearity. What does it mean?
The abstract starts: "Neural networks are non-linear static or dynamical systems that learn to solve problems from examples." What do they mean by that? Any general-purpose computer can represent non-linear funcations; say poly, exp or trigonometric. What is the feature of NNs? Thanks valentin@abelectron.com wrote: > The abstract starts: "Neural networks are non-linear static or > dynamical systems that learn to solve problems from examples." What do > they mean by that? Any general-purpose computer can represent > non-linear funcations; say poly, exp or trig...

non-proportional scaling a sketch entity
I want to scale a symetrical airfoil so that the length increases but the thickness stays the same, in Rhino this is real easy, in SW I've not a clue how to do it. The scale dialog box does not seem to support this type of scaling function........or does it??? using SW2005 SP04 Thanks, Brad www.hpaircraft.com No it won't. But you might want to try the Flex feature and use the stretch option. With it, you can limit the area of scale. If you're just scaling in one direction, you might be able to use stretch and not affect the endcap of the airfoil, but again I'm not sure wh...

help on creating a mean array of data
hello, iam very new to idl and would appreciate any help anyone could give on performing the following task: I have a large array of data which is meteorological data from multiple days. The data for each day is consistent (i.e. same amount) and i need a program that can average each kind of data For example, I have something like the following: day a : temp-1 temp-2 temp-3 day b : temp-1 temp-2 temp-3 and I need the following: day a+b: temp-1 temp-2 ...

[9fans] non-truncating create #2 #2
Still for the Brain-Dead SHell homework assignment... I’m trying to implement output redirection, > and >>. Truncating redirect (>) is easy; just use create(2) whether the file exists or no. The non-truncing option is puzzling me, though. If the file exists, I need to o = open(oname, OWRITE), then seek(o, 0, 2); if the file does not exist I need to create it. How do I check for the existence of a file? I’m thinking about the following code snippet: o = open(oname, OWRITE) rerrstr(errbuf, ERRMAX); if((strstr(errbuf, "file does not exist") == 0){ complain("c...

Hi Is it possible on Unix to create a shared library that will allow/deny load to specified proceses (executables) ? I mean the same thing than in DLLs' is done by something like that: BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID) { if(dwReason == DLL_PROCESS_ATTACH){ /* Check who's loading us. * and return FALSE to deny load or return TRUE to permit load */ } } I'd be grateful for any help. RL lew_r@poczta.onet.pl (Lew) writes: > Is it possible on Unix to create a shared library that will allow/deny > load to specified proceses (execut...

robust mean (computing mean with outliers)
I'm looking for a function to compute the robust mean of a sample with outliers. I.e., I want a function robustMean([0:4 100]) to return approximately 2 (and ideally tell me the 5th element was rejected). trimmean can do this if one tweaks the percent parameter (which is dependent on the magnitude of the outliers), but it will always ignore some of the data even if there are no outliers. robustfit's results depend on the order of the elements. Thanks! Hello: There exist a number of possibilities for your problem. Look at <http://www.agoras.ua.ac.be/Robustn.htm> If you are in a ...

Pascal self-hosting or self-compiler
What is the smallest Pascal self-hosting or self-compiler you have come across? I remember a version of the old Byte Tiny-Pascal (really just a souped up version of Wirth's PL/0) that was self-compiling, but it had several non-standard extensions in order to allow it to self-compile. About 1100 lines of code, even including comments. I also found a version of Jan L.A. van de Snepscheut's Pascal-S - a different subset than Wirth's Pascal-S (The only thing I noticed it left out in comparison to Wirth's Pascal-S was real number support). It had been modified to self-compile, and...

Help Self Relationship Eliminate Self
I have a table in FMP7 called "Campaign Calls". Each call inside of a campaign is attached to a campaign with a campaign ID. In my layout I am showing records from "Campaign Calls". But I also have a portal using a self joining relationship to show other calls that are also part of that campaign. As the status of calls are changed, the portal begins to lose records because they become unrelated. This is working fine. But, there is always 1 record left in the portal because the record is relating to itself. I am trying to show all calls that are related to the campaig...

create a mirror: directories created, files linked
I need to mirror a directory structure and create links for the files. THere will be no links embedded. I'm assuming that I can do this with find in 2 steps 1. create the linktree directory structure. find SOURCE_TREE -type d -exec mkdir -p LINK_TREE/- {} \; 2. create links to files find SOURCE_TREE -type f -exec ln -s LINKTREE/- - {} \; Not sure about the syntax. That is where I need the help. In article <1147368866.163157.32200@j73g2000cwa.googlegroups.com>, billy <bp1497@att.com> wrote: >I need to mirror a directory structure and create links for the files. &g...

Meanings
Can someone help me finding out what these following words mean or what they are. I'm new to all of this stuff and have been looking on the internet for hours on what they are. Please help if you can. IOS Level IOS Module Name IOS Image IOS Features BootFlash Module Flash Mem Size Num Flash SIMMs DRAMM Size NAT Range Interface Subnet Mask Has Hub SNMP Read SNMP Write SNMP Traps Enabled Thanks Elise In article <1123874528.151069.53860@g49g2000cwa.googlegroups.com>, lissy6098 <eg267703@ohio.edu> wrote: :Can someone help me finding out what these following words mean or what :...

what is the meaning
What is the meaning of this operator:- => Please tell about this. sam wrote: > What is the meaning of this operator:- > => > Please tell about this. Assignment - used in arrays? http://www.php.net/manual/en/language.types.array.php Also sprach BKDotCom: > sam wrote: >> What is the meaning of this operator:- >> => > Assignment - used in arrays? Hm. But why the need for a special operator here? Wouldn't a simple = have done the job just as well? Greetings, Thomas Thomas Mlynarczyk wrote: > > > sam wrote: > > > What is the m...

weighted mean; weighted standard error of the mean (sem)
I am looking for some reaally basic statistical tools. I have some sample data, some sample weights for those measurements, and I want to calculate a mean and a standard error of the mean. Here are obvious places to look: numpy scipy.stats statsmodels It seems to me that numpy's "mean" and "average" functions have their names backwards. That is, often a mean is defined more generally than average, and includes the possibility of weighting, but in this case it is "average" that has a weights argument. Can these functions be merged/renamed/depre...

create a form with Skill that create a file from library manager
I am developping a tool with skill language that generate automaticaly a testchip from a file that describe tle list of cells of the testchip. I want to create from an interface this file that contains in each line : "name of a library" "name of the cell" "the view of the cell" "the position of the cell in the testchip" the interface will contain a button called "BROWSE" when we click on the button the library manager appears and we choose the library, the cell name and the cell view , in this moment a file should be created containing all ...

FIGLIO DI CAGNA, TRUFFATORE: PAOLO BARRAI (DIVERSE VOLTE IN GALERA, NON SU WIKIPEDIA). UN ALTRO OTTIMO POST SULLA RETE, DI PERSONE CHE NON CONOSCIAMO, MA CHE TROVIAMO "AZZECCATISSIMO".
non solo mega lava soldi mafiosi, non solo vigliacco, non solo ladro, non solo eversivo, non solo falsissimo, non solo nazifascista, non solo estortore, non solo truffatore, non solo pervertitissimo sessuale, non solo gia' condannato a galera a milano e a porto seguro, in brasile, paolo barrai e' il piu' fallito cane in fiuto per affari mai vistosi. quando vi fu il meeting di bruxelles che varo' lo scudo para sedere di pedofilo silvio berlusconi, disse che si sarebbe salito a raffica. e siamo crollati, 10 giorni dopo, in alcuni casi, anche del 30% in borsa. sui minimi, sul m...

Create a ruler
Hi,all I want to create a ruler in the Virtuoso layout,this created ruler is cruciate,the length is 10um. a cursor position of mouse is the point of ruler. who can help me ,thank you! YuAmA wrote, on 06/11/09 15:21: > Hi,all > I want to create a ruler in the Virtuoso layout,this created ruler is > cruciate,the length is 10um. > a cursor position of mouse is the point of ruler. > who can help me ,thank you! Your question is not clear - how is this different from a normal ruler? Andrew. You want a ruler EXTACTLY 10um? Then set your x (or y) snap size to 10 and draw one unit ...

proportional hazards
OK, this is definitely a stat question not a code question. I am trying to analyze some 'disease' data, where one disease is a predisposing condition for another. The way I understand the proportional hazards model, when I include disease A (dza) as a time-dependent covariate for disease B (dzb) with PHREG as in: model rdays*dzb(0) = dza otherstuff ; if dzadays > rdays or dzadays = . then dza = 0; else dza = 1; otherstuff code; where dzadays is the number of riskdays (rdays) since the subject became positive for disease A. Then I'm basically saying that there i...

create URL
Hello, I have created a web applicaiton on one of my server. And now I would like to be accessed thru' the following URL: www.myapp.abc.com/newapp where www.abc.com is my company's domain. Could anyone tell me exactly how I can create www.myapp.abc.com and how I can get my web application linked to this URL please? Thanks in advance. And your help would be greatly appreciated. Wanda ...

Peer Means?
I have a dataset with information related to some clubs. The clubs (A1 A2 A3 B1 B2 B3 C1 C2 C3) can be classified into 3 major groups (A, B, and C) Here's my question: Is there a way to create a 'peer means' using proc means? (ie. A mean of Group A (minus club A1)) (Or is my best solution to simply run a calculation where I take: ((Group mean x Group N) - (Club mean x Club N) ) / (Group N - Club N) ) Signed, Chris Amherst On Wed, 11 Oct 2006, Christopher Amherst wrote: > I have a dataset with information related to some clubs. > > The clubs (A1 A2 A3 B1 ...

What does it mean to see
Glen M. Sizemore wrote: [...] > ... the question is "What does it mean to 'see,'" and > talking about representations doesn't get at this. [...] Just a stab at a general description of what it means to "see". Seeing means being able to use visually acquired data to guide some "goal" directed activity. John Casey JGCASEY wrote: > Glen M. Sizemore wrote: > [...] > >>... the question is "What does it mean to 'see,'" and >>talking about representations doesn't get at this. > > [...] > > J...

Alias meaning
Really I do not understand the meaning of alias in use command . Is it a workarea or another name for the dbf ? hpy > Really I do not understand the meaning of alias in use command . Is it > a workarea or another name for the dbf ? It's another way of addressing the workarea, instead of numbers your using readable text. Eg Instead of SELECT 1 USE TEST INDEX TEST use USE TEST INDEX TEST NEW // opens up TEST.DBF in the next available work area // whether that's 1 or 51 // Then instead of you having to know the workarea number you use SELECT( 'TE...