Statalist


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

Re: st: How to append a dataset using one observation only


From   "Kartick Gupta" <[email protected]>
To   <[email protected]>
Subject   Re: st: How to append a dataset using one observation only
Date   Fri, 16 Nov 2007 16:13:22 +1300

Hello Tiago,
I had a same memory problem. To solve this problem, I installed -savesome- command. It is very useful when you want to save data only for a particular variable or within some observations. Once you save the relevant data in different files, you can finally recall all the files into one file by using -joinby- function. It saved a lot of memory space for me.

For example

savesome variable in 1/5 using xyz1
savesome variable in 1/5 using xyz2...

and finally

clear
....
forvalues z=1/.. {
   joinby variable using xyz`z', unmatched(both)
   drop _merge
}

Hope it helps you.

Regards
Kartick


>>> <[email protected]> 16/11/2007 3:51 p.m. >>>
Dear Statalisters,

Due to problems with memory, I would like to know if it is possible to
append a dataset only using a specific observation.

For example, suppose we have the following datasets:

DATASET 01

variable1
1
2
3
4
5
6


DATASET 02

variable1
4
45
12
56
28

The objective is to add to dataset 01 only one out of 5 observations of
dataset 02 without creating a tempfile.

I am trying to implement tests used in genetics, in which each column is a
sequence of DNA, coded as 0,1,2 and 3. It seems that Stata cannot handle
well with such tests, since all memmory is rapidly consumed (~1 GB for a
relatively short segment of DNA analyzed for 10 or more subjects). Why
does Stata load everything into memory?

All the best,

Tiago


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