Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Identify and install user ado's (was: Re: -firstdigit- available from SSC)


From   "Ben Jann" <[email protected]>
To   [email protected]
Subject   st: Identify and install user ado's (was: Re: -firstdigit- available from SSC)
Date   Mon, 28 May 2007 11:50:44 +0200

A program that finds and installs all user-ado's (from SSC, say) does
not exist to my knowledge. It could be easily written, but I think
there is not much point in such a program because there is so much
stuff online, you would not want all that on your system at the time.

If you have to switch systems and want to reinstall the user ado's
that were on your old system, then have a look at -adolist- (type -ssc
describe adolist-). The procedure is to type

. adolist store <pgklist>

on the old system, copy the stored package list file to Stata's
working directory on the new system, and then type

. adolist install <pgklist>

on the new system to install the package from the net. <pgklist> is a
name for the package list of your choice.

Hope this helps,
ben

On 5/28/07, Zou Hong <[email protected]> wrote:
Dear All,

I have reinstalled my Stata system and run "update all" in Stata.

I wonder whether there is a simply way to identify and install all
(unofficial) user-written ado files (like ivreg2 and xtabond2 and many
others).

Many thanks
Joe

----- Original Message -----
From: "Nick Cox" <[email protected]>
To: <[email protected]>
Cc: <[email protected]>
Sent: Thursday, May 24, 2007 12:03 AM
Subject: st: -firstdigit- available from SSC


> Thanks to Kit Baum, a new package -firstdigit-
> is now available from SSC. Stata 9 is required,
> as the program depends on Mata. Use -ssc-
> to install if interested.
>
> -firstdigit- tabulates and analyses the first
> digits of numeric variables.  It also tests
> Benford's law that digits d = 1,..,9 occur
> with probabilities log10(1 + 1/d). Thus given
> data of 12, 345, 6789, etc., it would extract
> 1, 3, 6, etc., tabulate the frequencies of
> the digits 1 to 9 and give a chi-square test
> of the law.
>
> Users of Stata 8 may wish to look at -benford-
> by Nikos Askitas, also available from SSC
> (and revised today).
>
> Alternatively, users of Stata 8 may use -chitest-
> from the package -tab_chi-, also available from
> SSC, for this purpose. The help details a Benford's
> Law example.
>
> Mata users may be interested to see how the main
> work goes in Mata:
>
> void fd_work(string scalar varname,
>             string scalar tousename,
>             string scalar percent)
> {
>        real colvector y, obs, exp
>        real scalar n, i, chisq
>        string scalar name
>
>        y = st_data(., varname, tousename)
>        n = rows(y)
>        exp = obs = J(9, 1, 0)
>
>        y = strtoreal(substr(strofreal(y), 1, 1))
>
>        for (i = 1; i <= 9; i++) {
>                obs[i] = colsum(y :== i)
>                exp[i] = n * log10(1 + 1/i)
>                name = "r(obs" + strofreal(i) + ")"
>                st_numscalar(name,
>                        percent == "" ? obs[i] : 100 * obs[i] / n)
>                name = "r(exp" + strofreal(i) + ")"
>                st_numscalar(name,
>                        percent == "" ? exp[i] : 100 * log10(1 + 1/i))
>        }
>
>        chisq = colsum(((obs - exp):^2) :/ exp)
>        st_numscalar("r(p)", chi2tail(8, chisq))
>        st_numscalar("r(chisq)", chisq)
>        st_numscalar("r(N)", n)
> }
>
> Nick
> [email protected]
>
> *
> *   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/

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