Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: product of a variable


From   jose maria pacheco de souza <jmpsouza@usp.br>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: product of a variable
Date   Sat, 20 Oct 2012 16:53:55 -0300

Em 20/10/2012 16:05, Sun Yutao escreveu:
Hello users,

Just a silly question, how do I get the product of every element from a certain variable (the "pi" operator in math) in the dataset?

Thanks!


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

Could it be -gen newvar=certainvar*_pi-?
josé maria

--
Jose Maria Pacheco de Souza
Professor Titular (aposentado), Professor Senior
Departamento de Epidemiologia/Faculdade de Saude Publica, USP
Av. Dr. Arnaldo, 715
01246-904  -  S. Paulo/SP - Brasil
fones (11)3061-7747; (11)3768-8612
www.fsp.usp.br/~jmpsouza

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