*! version 1.06 14June2021

cnssc -- To mirror SSC Archive in China

(View complete PDF manual entry)

Introduction

cnssc is used mainly for Chinese users who may experience timeouts in using the ssc
command with large packages. cnssc periodically mirrors the contents accessible
from the ssc command with a domestic server maintained by lianxh.cn.

Selected packages from Github and other sources can also be downloaded
using cnssc command. These packages are stored in lianxh.cn server
and will be constant updating.

The new features of cnssc is as follows. You can use cnssc get pkgname
to copy ancillary files from package pkgname. Meanwhile,
when you type cnssc describe pkgname or cnssc install pkgname,
if there are ancillary files with this package, cnssc will automatally prompt you to install them.

cnssc is fast for Chinese users.

Quick start

. cnssc new (same as ssc new)

. cnssc hot, n(20) (same as ssc hot, n(20))

. cnssc install reghdfe

. cnssc install xtivreg2, replace

. cnssc get rdbalance

Syntax

The following contents are same as help ssc, except the newly added cnssc get.

Summary of packages most recently added or updated at SSC

cnssc
new
[,
saving(filename[, replace])
type]

Summary of most popular packages at SSC

cnssc
hot
[,
n(#)
author(name)]

Describe a specified package at SSC

cnssc
describe
{ pkgname | letter }
[,
saving(filename[, replace])]

Install a specified package from SSC

cnssc
install
pkgname
[,
all
replace]

Get ancillary files from a package

cnssc
get
pkgname
[,
all
replace
force]]

Uninstall from your computer a previously installed package from SSC

cnssc
uninstall
pkgname

Type a specific file stored at SSC

cnssc
type
filename
[, asis]

Copy a specific file from SSC to your computer

cnssc
copy
filename
[,
plus
personal
replace
public
binary]

where letter in cnssc describe is a-z or _.

Links to PDF documentation

Quick start

Remarks and examples

The above sections are not included in this help file.

Command overview

cnssc new summarizes the packages made available or
updated recently. Output is presented in the Stata Viewer, and from
there you may click to find out more about individual packages or
to install them.

cnssc hot
lists the most popular packages -- popular based on a moving
average of the number of downloads in the past three months.
By default, 10 packages are listed.

cnssc describe pkgname describes, but does not install, the specified
package. Use search to find packages; see [R] search. If
you know the package name but do not know the exact spelling, type
cnssc describe followed by one letter, a-z or _
(underscore), to list all the packages starting with that letter.

cnssc install pkgname installs the specified package. You do not
have to describe a package before installing it. (You may also
install a package by using net install; see [R] net.)

cnssc get pkgname copies the ancillary files of a specified package to your computer.
Specifing cnssc install pkgname, all can install the package and copy its ancillary files in one step.
(You may also copy the ancillary files by using net get; see [R] net.)

cnssc uninstall pkgname removes the previously installed
package from your computer. It does not matter how the package was
installed. (cnssc uninstall is a synonym for ado uninstall, so
either may be used to uninstall any package.)

cnssc type filename types a specific file stored at SSC.
cnssc cat is a synonym for cnssc type, which may appeal to those
familiar with Unix.

cnssc copy filename copies a specific file stored at SSC to your
computer. By default, the file is copied to the current directory, but
you can use options to change this. cnssc copy is a rarely used
alternative to cnssc install ..., all. cnssc cp is a
synonym for cnssc copy.

Options for ssc new

saving(filename[, replace]) specifies that the
"what's new" summary be saved in filename. If filename is
specified without a suffix, filename.smcl is assumed. If
saving() is not specified, saving(ssc_result.smcl) is assumed.

type specifies that the "what's new" results be displayed in the
Results window rather than in the Viewer.

Options for ssc hot

n(#)
specifies the number of packages to list; n(10) is the default.
Specify n(.) to list all packages in order of popularity.

author(name)
lists the 10 most popular packages by the specified author.
If n(#) is also specified, the top #
packages are listed.

Option for ssc describe

saving(filename[, replace]) specifies that, in
addition to the description's being displayed on your screen, it be saved
in the specified file.

If filename is specified without an extension, .smcl will be
assumed, and the file will be saved as a SMCL file.

If filename is specified with an extension, no default extension
is added. If the extension is .log, the file will be stored as
a text file.

If replace is specified, filename is replaced if it already
exists.

Options for ssc install

all specifies that any ancillary files associated with the
package be downloaded to your current directory, in addition
to the program and help files being installed. Ancillary files are files
that do not end in .ado or .sthlp and typically contain
datasets or examples of the use of the new command.

You can find out which files are associated with the package by typing
cnssc describe pkgname before or after installing. If you
install without using the all option and then want the ancillary
files, you can cnssc install again.

replace specifies that any files being downloaded that already exist
on your computer be replaced by the downloaded files. If
replace is not specified and any files already exist, none of the
files from the package is downloaded or installed.

It is better not to specify the replace option and wait to see if
there is a problem. If there is a problem, it is usually better to
uninstall the old package by using cnssc uninstall or
ado uninstall (which are, in fact, the same command).

Options for ssc get

all typed with either cnssc install or cnssc get is equivalent to typing cnssc install followed by cnssc get.

replace specifies that the downloaded files replace existing files if any of the files already exists.

force specifies that the downloaded files replace existing files if any of the files already exists, even if
Stata thinks all the files are the same. force implies replace.

Option for ssc type

asis affects how files with the suffixes .smcl
and .sthlp are displayed. The default is to interpret SMCL
directives the file might contain. asis specifies that the file be
displayed in raw, uninterpreted form.

Options for ssc copy

plus specifies that the
file be copied to the PLUS directory, the directory where
community-contributed additions are installed. Typing sysdir
will display the identity of the PLUS directory on your computer.

personal specifies that the file be copied to your PERSONAL
directory as reported by sysdir.

If neither plus nor personal is specified,
the default is to copy the file to the current directory.

replace specifies that, if the file already exists on your computer,
the new file replace it.

public specifies that the new file be made readable by everyone;
otherwise, the file will be created according to the default permission you
have set with your operating system.

binary specifies that the file being copied is a binary file and that it
is to be copied as is. The default is to assume that the file is a text
file and change the end-of-line characters to those appropriate for your
computer/operating system.

Remarks

See help ssc.

Examples

Describe most recently added or updated packages at SSC

. cnssc new

Describe the most popular packages at SSC

. cnssc hot

. cnssc hot, n(10) author(Cox)

Describe the package firthlogit

. cnssc describe firthlogit

Describe the package firthlogit and save the description to the
file firthlogit.log

. cnssc describe firthlogit, saving(firthlogit.log)

List all packages, along with a brief description, that begin with the
letter f

. cnssc describe f

Same as above, but also save the listing to the file f.index

. cnssc describe f, saving(f.index)

Install package firthlogit

. cnssc install firthlogit

Install package firthlogit and ancillary files

. cnssc install firthlogit, all

Copy ancillary files of package firthlogit to current directory

. cnssc get firthlogit

Uninstall previously installed package firthlogit

. cnssc uninstall firthlogit

Type file potter.do that is stored at SSC

. cnssc type potter.do

Copy file fuzzydid_Gentzkowappli.do from SSC to your computer

. cnssc copy fuzzydid_Gentzkowappli.do

Description and brief history of SSC

ssc is based on archutil by Nicholas J. Cox of the Department of Geography at Durham
University, UK, who is coeditor of the Stata Journal and author of Speaking Stata Graphics and by
Christopher F. Baum of the Department of Economics at Boston College and author of the Stata
Press books An Introduction to Modern Econometrics Using Stata and
An Introduction to Stata Programming. The reworking of the original was done with their blessing and their participation.
Baum maintains the Stata-related files stored at the SSC Archive. We thank him for this contribution
to the Stata community (See [R] Acknowledgments).

ssc works with packages (and files) from the Statistical Software
Components (SSC) Archive, which is often called the Boston College Archive and
is provided by http://www.repec.org.

The SSC has become the premier Stata download site for community-contributed
software on the web. ssc provides a convenient interface to the
resources available there. For example, on
Statalist, users will often
write

The program can be found by typing cnssc install newprogramname.

Typing that would load everything associated with newprogramname,
including the help files.

If you are searching for what is available,
type cnssc new and cnssc hot, and
see [R] search.
search searches the SSC and other places, too.
search
provides a GUI interface from which programs can be
installed, including the programs at the SSC Archive.

You can uninstall particular packages by using cnssc uninstall.
For the packages that you keep,
see [R] ado update
for an automated way of keeping those packages up to date.

Authors

Yujun Lian

Lingnan College, Sun Yat-Sen University, China.

arlionn@163.com.

Blog: lianxh.cn

Christopher F. Baum

Boston College

Chestnut Hill, MA USA

baum@bc.edu

Also see

adoupdate, net, findit, search, sj

lianxh (if installed), songbl (if installed), lxhuse (if installed)