Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: AW: st: error message "too many weights"


From   Steve Samuels <sjsamuels@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: AW: AW: st: error message "too many weights"
Date   Sun, 25 Mar 2012 12:47:33 -0400

You did not follow my advice to look at the examples. You only removed the last bracket; the beginning "[" of the second pair remains. 

Steve
sjsamuels@gmail.com

On Mar 25, 2012, at 12:40 PM, Jette Kellerhoff wrote:

Thanks for your advice. If I remove the brackets, I get the following error
message may not use noninteger frequency weights. I don't understand it,
because fweights are allowed in the stset-command. 
The do-file:
stset tfp [fweight=gew] [ ,id(hhnrakt) f(des=2 4 6 8 10 12) exit(time.)

Jette



-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Steve Samuels
Gesendet: Donnerstag, 22. März 2012 22:45
An: statalist@hsphsun2.harvard.edu
Betreff: Re: AW: st: error message "too many weights"


I should add that in the -help- for -stset-, the brackets indicate where
options, if any, should go. Before running an unfamiliar command, always
look at the examples at the bottom of the help screen or in the manual.

Steve

Remove the second pair of brackets in your -stset- statement. They are not
legal Stata syntax.



Steve
sjsamuels@gmail.com


On Mar 22, 2012, at 3:18 PM, Jette Kellerhoff wrote:

Sorry for the impatientness, but I have to solve the problem very soon. 
The case:
- 4841 subjects with multiple record per subject (max 4 records)
- for each subject exists a weight, which identifies the real abundance
pattern in time

I used the following do-file: 
gen des =tfin~=ti

gen tf = tfin-tstart+1

gen org=1+2*(spell-1)
replace des=org
replace des=org+1 if tfin<ti
gen tfc=tstart if spell==1
replace tfc=tfc[_n-1] if spell~=1 & hhnrakt==hhnrakt[_n-1]
gen tsp = tstart-tfc
gen tfp = tfin-tfc+1
stset tfp [fweight=gew] [ ,id(hhnrakt) f(des=2 4 6 8 10 12) exit(time .)]  

Thanks for your support.    

-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Richard Herron
Gesendet: Donnerstag, 22. März 2012 19:49
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: error message "too many weights"

Jette, can you provide a reproducible example? That may help diagnose
your problem. Can you reproduce the error with -sysuse- data or
provide your console output, please?

Also, it may take more than a few hours to get a response given
different time zones and work schedule.

Richard Herron



On Thu, Mar 22, 2012 at 14:34, Jette Kellerhoff <jettek82@aol.com> wrote:
> Dear Statalist members,
> 
> how to deal with weights according to survival data analysis? If I use
> fweights according to stset command, I get the error message "too many
> weights". Does anyone have any suggestions?
> Thanks for your support.
> 
> Jette
> 
> 
> 
> 
> *
> *  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/


*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index