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]

AW: st: setting subcosts using sqom-ado


From   "Tisch Anita" <[email protected]>
To   <[email protected]>
Subject   AW: st: setting subcosts using sqom-ado
Date   Thu, 24 Feb 2011 15:01:17 +0100

Dear Uli,

thanks a lot for your respond. Although I did use the latest version of your ado-files your 'test-file' still gave me the hint to my mistake. I recoded my element-variable from 1 2 3 4 5 6 to 1 2 3 4 6. The missing '5' caused the problem.
It makes sense that the element-variable has to be coded consecutively...

Thank you very much anyway for pushing my thoughts.

Anita
 
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im Auftrag von Ulrich Kohler
Gesendet: Donnerstag, 24. Februar 2011 10:06
An: [email protected]
Betreff: Re: st: setting subcosts using sqom-ado

Am Mittwoch, den 23.02.2011, 17:03 +0100 schrieb Tisch Anita:
> I have a problem using the sqom-ado. I want to use transition probabilities to set the subcosts. Thanks to the ado-files I can easily do so by using the (meanprobdistance) option. Unfortunately Stata gives me a error message:
> 
> subcosthash():  3204  <tmp>[8,1] found where scalar required
> needlemanwunschexactmatrix():     -  function returned error
>                sqomref():     -  function returned error
>                  <istmt>:     -  function returned error
> 
> Return code 3204 = ‘matrix found where square required’
> 
> Hence, Stata is giving me a subcost-matrix, but it is not symmetric? Is this causing the problem? Any ideas how I can solve it?


Dear Anita,

I am the author of sqom.ado from SSC that you are using. I just tried
out

. use http://www.wzb.eu/~kohler/ado/youthemp, clear
. reshape long st, i(id) j(order)
. sqset st id order 
. sqom,  subcost(meanprobdistance)

which runs fine.

>From the error message I see, that the -sqom- calls the Mata function
-subcosthash()-, which is not used in the most recent version of the
program. Hence, I think you are using an outdated version of the
SQ-Ados.

Most likely you have installed the version that was delivered with the
Stata Journal article of year 2006. Please uninstall this version and
install the most recent version of the program form the SSC archive. To
do this just type:

. ado unistall st0111
. ssc install sq

Not quite sure whether it is necessary, but I also recommend to type

. discard
. mata: mata mlib index

before trying out your new installation.


Uli



*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index