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: setting subcosts using sqom-ado


From   Ulrich Kohler <[email protected]>
To   [email protected]
Subject   Re: st: setting subcosts using sqom-ado
Date   Thu, 24 Feb 2011 10:05:58 +0100

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/


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