Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: counting in radioactive measurement


From   "Steichen" <[email protected]>
To   "StataList" <[email protected]>
Subject   Re: st: Re: counting in radioactive measurement
Date   Sun, 13 Jun 2004 11:29:57 -0400

Andreas,

The code I sent earlier does not count an interval that includes the upper
limit, 10000.  If you wish to count it also, then:

local mult = 1.003
local i = 0
while 30*`mult'^(`i') < 10000 {
   di as txt %12.5f 30*`mult'^`i' ": " _c
   count if dosis_corr >= 30*`mult'^`i' & dosis_corr < 30*`mult'^(`i'+1)
   local i = `i'+1
}

Agai, the display statement shows the lower limit of the interval counted.

Tom



----- Original Message ----- 
From: "Andreas Aschbacher" <[email protected]>
To: <[email protected]>
Sent: Sunday, June 13, 2004 11:09 AM
Subject: Re: st: Re: counting in radioactive measurement


> Dear Tom !
> thank you for answering so quick !
> I start to test it
> sincerely,andreas
>
> > Andreas,
> >
> > The following code should do what you want:
> >
> > local mult = 1.003
> > local i = 0
> > while 30*`mult'^(`i'+1) < 10000 {
> > *   di 30*`mult'^`i' ": " _c
> >    count if dosis_corr >= 30*`mult'^`i' & dosis_corr < 30*`mult'^(`i'+1)
> >    local i = `i'+1
> > }
> >
> > If you wish to see the ranges being counted, remove the asterisk (*) on
> > the
> > display statement
> >
> > Tom
> >
> > ----- Original Message ----- 
> > From: "Andreas Aschbacher" <[email protected]>
> > To: <[email protected]>
> > Sent: Sunday, June 13, 2004 9:26 AM
> > Subject: st: counting in radioactive measurement
> >
> >
> > > Dear fellows !
> > >
> > > I am using the following program for counting my variable-values :
> > > /the name of the variable is dosis_corr /
> > > --------------------------
> > > local i = 1
> > > while `i' < 10000 {
> > >         count if dosis_corr >= `i' & dosis_corr  < `i' + 1
> > >         display
> > >         local i = `i' + 1
> > > }
> > > --------------------------
> > > my question:
> > > I'd like to start with i = 30 instead of 1 (see above)by using
> > > multiplikation-faktor mult : mult = 1.003 in the following way:
> > > counting between  30(<=) and (<)30* mult    then
> > > counting between  30*mult(<=)  and (<)30* (mult)^2  then
> > > counting between  30*(mult)^2(<=) and (<)30* (mult)^3  and so on
> > > with: 30 * (mult)^n no larger than 10000 as condition
> > > ~
> > > any help will be appreciated very much !
> > > I did not have Stataprogramming-course yet
> > >
> > > sincerely aschbacher andreas
> > >
> > >
> > >
> > >
> > >
> > > -- 
> > > "Sie haben neue Mails!" - Die GMX Toolbar informiert Sie beim Surfen!
> > > Jetzt aktivieren unter http://www.gmx.net/info
> > >
> > > *
> > > *   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/
> >
> > *
> > *   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/
> >
>
> -- 
> +++ Jetzt WLAN-Router f�r alle DSL-Einsteiger und Wechsler +++
> GMX DSL-Powertarife zudem 3 Monate gratis* http://www.gmx.net/dsl
>
> *
> *   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/

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