Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Sqaure root

From   Philip Ryan <[email protected]>
To   [email protected]
Subject   Re: st: Sqaure root
Date   Thu, 07 Oct 2004 12:35:02 +0930

Stata will find it hard to take the square root of a data set, but the square root of a variable is attainable.


gen square = sqrt(diameter)

noting that parentheses, not braces, delimit the argument of a function.


At 09:31 PM 6/10/2004 -0500, you wrote:

I am a beginning stat major, and I am trying to figure out how to command the
stata program to take the square root of a data set, after I have already
infiled some data.

I typed:

gen square = sqrt{diameter}

but it doesnt work

it says sqrt not found.

does anyone know the command?

*   For searches and help try:
Philip Ryan
Associate Professor,
Department of Public Health
Associate Dean (Information Technology)
Faculty of Health Sciences
University of Adelaide 5005
South Australia
tel 61 8 8303 3570
fax 61 8 8223 4075
CRICOS Provider Number 00123M
This email message is intended only for the addressee(s)
and contains information that may be confidential and/or
copyright. If you are not the intended recipient please
notify the sender by reply email and immediately delete
this email. Use, disclosure or reproduction of this email
by anyone other than the intended recipient(s) is strictly
prohibited. No representation is made that this email or
any attachments are free of viruses. Virus scanning is
recommended and is the responsibility of the recipient.

*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index