Statalist


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

Re: st: trouble using _n-1


From   "Joao Ricardo F. Lima" <jricardofl@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: trouble using _n-1
Date   Tue, 25 Nov 2008 14:24:22 -0300

Nick,

you are right. To avoid this, it´s important to sign with your advice
and insert in the message something like this:

TITLE
      STB-58 sg84_3.  Concordance correlation coefficient:  minor corrections

DESCRIPTION/AUTHOR(S)
      STB insert by Thomas J. Steichen, RJRT
                    Nicholas J. Cox, University of Durham, UK
      Support:  steicht@rjrt.com, n.j.cox@durham.ac.uk
      After installation, see help concord

Joao Lima


2008/11/25 Nick Cox <n.j.cox@durham.ac.uk>:
> Joao doesn't mean what he says. _N-1 is the subscript of the next to
> last observation in a group. _n-1 is the subscript of the previous
> observation.
>
> I doubt that, even if corrected for this typo, this is what Joseph
> wants. It just checks whether the previous value was the same or
> different. Joseph wants to measure reliability, a different though
> tangentially related story.
>
> Nick
> n.j.cox@durham.ac.uk
>
> Joao Ricardo F. Lima
>
> I think that this can do the trick:
>
> by idcode: assert var1-var1[_N-1]==0
>
> 2008/11/25 Joseph Wagner <joseph.wagner@wright.edu>:
>
>> I wish to use the program -concord- to perform an interrater
> reliability for
>> a rater.  The data is arranged as such:
>>
>> idcode      date    var1   var2
>> --------------------------------------------
>> person1   date    var1   var2
>> person1   date    var1   var2
>> person2   date    var1   var2
>> person2   date    var1   var2
>>
>>
>> there are too many variables and observations for me to -reshape- wide
> so I
>> thought that I could try this:
>>
>> bysort idcode date: concord var1 var1[_n-1]      since the data is
> arrayed
>> as pairs of observations which I wish to compare
>>
>> but instead of working I get the following error: "_n unknown weight
> type"
>>
>> Am I forced to try some sort of piecewise -reshape- (sets of
> variables) or
>> am I just doing this all wrong?
>
> *
> *   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/
>



-- 
----------------------------------------
Joao Ricardo Lima, D.Sc.
Professor
UFPB-CCA-DCFS
Fone: +553138923914
Skype: joao_ricardo_lima
----------------------------------------

*
*   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   |   What's new   |   Site index