Statalist


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

Re: RE: st: Hosmer-Lemeshow test with clogit


From   "Peter Dijkstra" <[email protected]>
To   [email protected]
Subject   Re: RE: st: Hosmer-Lemeshow test with clogit
Date   Thu, 07 Feb 2008 09:34:30 +0100

I was indeed thinking that, thanks.
Now, I am able to find the maximum per individual, using
   by each_individual: sum probability, meanonly
I'd like to save the maximum value of each individual in some variable. So:
  individual  value  max
  1           .4     .6
  1           .6     .6
  2           .35    .65
  2           .65    .65
  etc.
How do I save those maximum values per individual in a new variable?
Cheers, Peter

-------- Original-Nachricht --------
> Datum: Wed, 6 Feb 2008 18:10:24 -0000
> Von: "Nick Cox" <[email protected]>
> An: [email protected]
> Betreff: RE: st: Hosmer-Lemeshow test with clogit

> I guess you think that -max(probability)- looks in variable
> -probability- and returns the maximum. It doesn't do that. If that's
> what you want, you need to do this first 
> 
> su probability, meanonly 
> 
> and then to use that maximum r(max) in what follows. 
> 
> Nick 
> [email protected] 
> 
> Peter Dijkstra
> 
> That's a good idea!
> I have a 4-option model, then I have the problem that a threshold of 25%
> nor the maximum probability are perfect as threshold. However, what if
> I'd like to select the maximum value? I use
>     by each_individual: gen correctly_predicted = (probability ==
> max(probability))
> But this ain't working: what do I do wrong?
-- 
Psssst! Schon vom neuen GMX MultiMessenger geh�rt?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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