[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Steven Samuels <sjhsamuels@earthlink.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: error message single sample unit |

Date |
Mon, 1 Sep 2008 09:13:36 -0400 |

Sahid--

I think your most serious problem may not be single unit strata, but that only 81 of 19,474 observations have non-missing values for variable sd107f. What is this variable? Is it coded correctly? Is it defined only for a sub-population? If so, then the advice I gave earlier is not sufficient. You must also add the -subpop- option to the survey estimation commands.

For example, suppose I want to estimate the percent of cigarette smokers who inhale deeply. My variable "inhale" is defined only for smokers and is missing for all others; smoking is indicated by variable smoke (=1 for yes = 2 for no). Then my subpop option would look like:

svy, subpop(if smoke==1): mean inhale

-Steve

On Aug 31, 2008, at 10:04 AM, Steven Samuels wrote:

Sahid-

I don't understand your question. I see two options, neither of which is difficult.

1. In -svyset-, set the -singleunit- option to something other than the default "missing". I suggest singleunit(centered). This setting will apply to analyses of other variables with single units.

2. Create a new stratum variable for the analysis of sd107f by merging single unit strata to adjacent ones. This assumes that strata with adjacent numbers are "near" each other in some physical sense.

For example:

gen st_sd107f = v012 //your stratum

recode st_sd107f 19=20 27=28 29=30 etc.

Then prior to analyses of this sd107f, -svset- your data again with the new stratum variable.

-Steve

On Aug 30, 2008, at 4:46 PM, Sahid Hocine wrote:

Dear All,

Running a svylogit am confronted with that message which seems easy

to solve looking at the stata help. I used -svydes- however i have

load of observations to reassign. Is theere an easier than- list- way

to do so?

Thanks

--------------------------------------------------------------------- -----------------

svydes sd107f

Survey: Describing stage 1 sampling units

pweight: weight

VCE: linearized

Single unit: missing

Strata 1: v012

SU 1: v021

FPC 1: <zero>

#Obs with #Obs with #Obs per included Unit

#Units #Units complete missing ----------------------------

Stratum included omitted data data min mean max

-------- -------- -------- -------- -------- -------- -------- --------

15 0 12 0 12 0 0 0

16 0 55 0 63 0 0 0

17 0 119 0 151 0 0 0

18 0 205 0 265 0 0 0

19 1* 248 1 366 1 1.0 1

20 1* 321 1 481 1 1.0 1

21 0 320 0 483 0 0 0

22 4 388 4 656 1 1.0 1

23 2 399 2 693 1 1.0 1

24 7 413 7 681 1 1.0 1

25 4 482 4 980 1 1.0 1

26 4 439 4 743 1 1.0 1

27 1* 402 1 679 1 1.0 1

28 4 415 4 711 1 1.0 1

29 1* 412 1 653 1 1.0 1

30 2 445 2 783 1 1.0 1

31 2 378 2 613 1 1.0 1

32 3 396 3 635 1 1.0 1

33 2 381 2 597 1 1.0 1

34 2 358 2 550 1 1.0 1

35 2 458 2 849 1 1.0 1

36 2 365 2 563 1 1.0 1

37 1* 383 1 598 1 1.0 1

38 6 386 6 608 1 1.0 1

39 6 364 6 551 1 1.0 1

40 2 447 2 771 1 1.0 1

41 1* 330 1 497 1 1.0 1

42 4 381 4 585 1 1.0 1

43 4 341 4 510 1 1.0 1

44 3 322 3 450 1 1.0 1

45 2 444 2 757 1 1.0 1

46 2 302 2 413 1 1.0 1

47 1* 316 1 448 1 1.0 1

48 2 352 2 519 1 1.0 1

49 3 312 3 479 1 1.0 1

-------- -------- -------- -------- -------- -------- -------- --------

35 81 12091 81 19393 1 1.0 1

------------------

19474

--------------------------------------------------------------------- -----

*

* For searches and help try:

* http://www.stata.com/help.cgi?search

* http://www.stata.com/support/statalist/faq

* http://www.ats.ucla.edu/stat/stata/

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

* * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**RE: RE: st: showing row labels in -table-** - Next by Date:
**RE: st: finding a sequence of numbers within a numeric variable** - Previous by thread:
**RE: st: finding a sequence of numbers within a numeric variable** - Next by thread:
**RE: st: too many variables** - Index(es):

© Copyright 1996–2015 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |