[R] How many records could I store in a dataframe?

2004-09-17 Thread wanr
Hi all,

I have a dataframe with 2 variables and 6,000,000 records. It seems R will 
crash when the number of record is larger than 3,000,000. How many records 
could I store in a dataframe

Rui

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] How to bootstrap Kaplan-Miere estimator with 95% envelope

2004-09-13 Thread wanr
Hi all,

Given a typical right-censoring data which contains a time variable and a 
censoring indicator. How do we bootstrap samples to obtain a 95% envelope 
for the estimated cumulative hazard function?

Thanks in advance.

Rui

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] How to obtain a 95% envelope for the estimated cumulaitve hazard function via bootstrap?

2004-09-13 Thread wanr
Hi all,

Given a typical right-censoring data which contains a time variable and a 
censoring indicator. How do we bootstrap samples to obtain a 95% envelope 
for the estimated cumulative hazard function?

Rui

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] How to obtain a 95% envelope for the estimated cumulative risk function from bootstrap samples

2004-09-10 Thread wanr
Hi all,

The hypothetical data is displayed as follows.

ID   time   status 
1 81   0 
2 42   1
3 37   1
4 54   0
5 35   0
6 38   1
7 29   0
8 40   0

Question 1: How to obtain a 95% envelope for the estimated cumulative risk 
function from bootstrap samples? I guess the output of this step consists of 
the envelope and the estimated cumulative risk function.

Question2: bootstrap process will be repeated for n times; then the average 
cumulative risk function was estimated  as the median of the n empirical 
cumulative risk functions. My question is how to plot this so called Average 
Risk Function vs. time easily instead of using lines() and points() to draw 
the above step function?

Thanks in advance.


Rui

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



[R] How to obtain a 95% envelope for the estimated cumulative risk function from bootstrap samples

2004-09-10 Thread wanr
Hi all,

I am trying to replicate the results from a paper. The problems are in the 
setting of survival analysis.

The hypothetical data is displayed as follows.

ID   time   status 
1 81   0 
2 42   1
3 37   1
4 54   0
5 35   0
6 38   1
7 29   0
8 40   0

Question 1: How to obtain a 95% envelope for the estimated cumulative risk 
function from bootstrap samples? I guess the output of this step consists of 
the envelope and the estimated cumulative risk function.

Question2: bootstrap process will be repeated for n times; then the average 
cumulative risk function was estimated  as the median of the n empirical 
cumulative risk functions. My question is how to plot this so called Average 
Risk Function vs. time easily instead of using lines() and points() to draw 
the above step function?

Thanks in advance.


Rui

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] How to draw an observation uniformly from a given dataset?

2004-09-08 Thread wanr
Hi all,

I have two questions stated below:

1. How to draw an observation uniformly from a given data?

For example, I have a dataset (or dataframe) with 10 observations (with a 
set of variables) and I want to uniformly select an observation from this 
given dataset, that is, the probability of selecting each observation is 
1/10. 

2. How to do this combinations?

source vector = (1,2)
the length of the target vector = 3

My expected outputs should be: 
111, 112, 121, 122, 211, 212, 221, 222.

However, the output from the function of combinations() is only 111, 112, 
122, 222. I can not even use the function permutations() because the length 
of the target vector is larger than the lengthe of the source vector.
Could anybody tell me how to get my expected results? 

Thank you in advance.

Rui

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] How to do this combination ?

2004-09-08 Thread wanr
Thanks David first.

Probably, David misunderstood my points.

source vector = (1,2)
the length of the target vector = 3

My expected complete outputs should be:
111, 112, 121, 122, 211, 212, 221, 222.

sample(c(1,2),3,replace=TRUE) just gives me one randomly sampled 
combination at a time. However, I need the whole list displayed above at a 
time.

Rui

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html