Statalist The Stata Listserver


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

st: RE: store tabulate data


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: store tabulate data
Date   Tue, 12 Jun 2007 18:08:57 +0100

This is an FAQ: 

FAQ     . . . . . . . . . . . . . . .  Saving frequencies produced by tabulate
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . W. Sribney
        3/97    Is there any direct way to save into a new variable the
                frequencies obtained by applying the command tabulate?
                http://www.stata.com/support/faqs/data/tabfreq.html

In general, there is no more reason to expect R syntax to work in 
Stata than there is to expect Stata syntax to work in R. 

Nick 
[email protected] 

bunny ,
 
> i am really new to stata and work with R for a little while, so i  
> guess my problem is rather basic and rather a syntax problem.
> i have a dataset with household numbers of kids and i want to get a  
> new "number of siblings" variable.
> that means i�d like to store the frequency of household number just  
> right next to the household number itself.
> 
> my approach is to use tabulate householdnumber... which prints a  
> table of frequency and percentages.
> 
> Can I do it like that ? And how can I store this frequency as a  
> variable ? such that i can see it in the data editor as a column ?
> 
> in R something like A = tabulate householdnumber would have worked.  
> but in STATA it does not.
> Somehow I used the wrong search phrases so far there must exist  
> something like it.
> 
> i have the same problem storing correlation matrices. 
> mycorrmat = cor  
> a b c d  aint working neither.

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