Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: cell names for results generated from user-written package 'markov'


From   Nick Cox <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: cell names for results generated from user-written package 'markov'
Date   Thu, 22 Aug 2013 18:08:53 +0100

1. -markov-.

Sometimes, people just don't read documentation!

. ssc desc markov

-------------------------------------------------------------------------------------
package markov from http://fmwww.bc.edu/repec/bocode/m
-------------------------------------------------------------------------------------

TITLE
      'MARKOV': module to generate Markov probabilities

DESCRIPTION/AUTHOR(S)

      markov examines varname, treated as a sequence or series, to
      produce basic summaries relevant to discrete-time, discrete-state
      Markov chains. markov tabulates one-step transition frequencies
      from one state to another, carries out a chi-square test for
      independence, and tabulates a transition probability matrix. The
      frequency matrix and the probability matrix are saved as F and P,
      or as whatever names are specified. Matrices with these names are
      overwritten. It is the user's responsibility to  ensure that data
      are in the appropriate sort order when markov is called. tabchi
      must be installed first. Note added 2011: This is a small and
      limited program from 1998  that just does what it says, and no
      more. For example, it does not support panel data, or  modelling
      with predictor variables, or do almost anything else you might
      want to do with  Markov chain models.

      Author: Nicholas J. Cox, University of Durham
      Support: email [email protected]

      Distribution-Date: 19980228

2. What to do

Reduce your dataset to averages with -collapse-, then apply -xtset.
The problem sounds too messy to contemplate otherwise.

Nick
[email protected]


On 22 August 2013 17:52, Milena Przheska
<[email protected]> wrote:
> - Nick,
>
> Thank you for your reply.
>
> Sometimes less is more.
>
> The problem with the -xttrans- I'm facing is that it requires that
> panel data be declared with -xtset-
>
> What is particular with my data set is that it records choices by
> different subjects and sometimes dates are the same. I have large
> number of subjects, so -by- command will not be useful. I am
> interested in the changes between choices on average, so I added
> missing values to break between subjects.
>
> This is little unconventional, and I cannot find a way to tweak
> -xtset- for this particular case.
>
> Thanks,
> Milena
>
> On Thu, Aug 22, 2013 at 6:26 PM, Nick Cox <[email protected]> wrote:
>> That is an ancient program that does very little.
>>
>> See -xttrans- or http://www.stata.com/statalist/archive/2013-04/msg01043.html
>> Nick
>> [email protected]
>>
>>
>> On 22 August 2013 16:53, Milena Przheska
>> <[email protected]> wrote:
>>> Dear Statalist members,
>>>
>>> I am using the following package
>>>
>>> package markov from http://fmwww.bc.edu/RePEc/bocode/m
>>> Author: Nicholas J. Cox, University of Durham
>>>
>>>
>>> I export the results from the matrices F and P to excel, but the row
>>> and column names are simply r1, r2...c1, c2...
>>>
>>>
>>> I am exploring the transition from one choice to another for
>>> categorical variable with many levels and I do not know upfront which
>>> choices appear and which do not, so it is important for me to save the
>>> names of the rows and columns in a way that will enable me to identify
>>> which levels of the variable they refer to.
>>>
>>> Is there a way to do this within the package I am using or some other
>>> package/command?
>>>
>>>
>>> Thanks for all your help, I appreciate it.
>>>
>>>
>>> Kindest regards,
>>> Milena Przheska
>>> *
>>> *   For searches and help try:
>>> *   http://www.stata.com/help.cgi?search
>>> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/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/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index