[R] Weibull simulation- number of items to replace is not a multiple of replacement length

2010-09-16 Thread Halabi, Anan
Hi, I write below code for simulation for weibull- estimating parameters by weibullMLE function, Although I define metrix for the variables still I got this message: number of items to replace is not a multiple of replacement length Any suggestion > est=matrix (NA, 2,2) > se=matrix (NA, 2,2) >

[R] Matrix- create mean/min/max/stdev on column of matrix or rows?

2010-09-17 Thread Halabi, Anan
I made simulation with Weibull and create Matrix, How can I create mean/min/max/stdev on column or rows of matrix?, Thanks, __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-p

[R] Weibull- Random Censoring

2010-09-19 Thread Halabi, Anan
I generate random vector from Weibull distribution sampWB <-urweibull(sampleSize, shape=shape.true, scale=scale.true, lb=0, ub=Inf) how can I create subvector containing 30% of samplesize of sampWB which should be assigned as Censored data? The probability for each value in sampWB can be uniform

[R] Recall: Weibull- Random Censoring

2010-09-19 Thread Halabi, Anan
Halabi, Anan would like to recall the message, "Weibull- Random Censoring". __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html a

[R] Removing slected values from original vector and definning new vector with the rest?

2010-09-20 Thread Halabi, Anan
sampleSize <- 20 shape.true <- 1.82 scale.true <- 987 sampWB <- rweibull(sampleSize, shape=shape.true, scale=scale.true) print(sampWB) censidx <- sample(1:length(sampWB), length(sampWB)*0.3) Censored.data <- sampWB[censidx] noncensidx <- defines the rest values of the vector which is not include

[R] Estimating Weibull parameters by maximum liklihood - with censored and non censored data?

2010-09-20 Thread Halabi, Anan
Below my code: sampleSize <- 20 shape.true <- 1.82 scale.true <- 987 sampWB <- rweibull(sampleSize, shape=shape.true, scale=scale.true) print(sampWB) censidx <- sample(1:length(sampWB), length(sampWB)*0.3) Censored.data <- sampWB[censidx] print(Censored.data) NonCensored.data <- sampWB[-censidx] p

[R] when i create data.frame is time variable and Censor variable should be equal?

2010-09-21 Thread Halabi, Anan
Error in data.frame(times = NonCensored.data, censor = Censored.data) : arguments imply differing number of rows: 14, 6 Anan Halabi Reliability Eng, R&D HP Scitex Tel: 972-9-8924648 mobil: 972-52-6624231 __ R-help@r-project.org mailing list https://s

[R] Reliability metric

2011-09-09 Thread Halabi, Anan
Hi, Below is the code I write, I am trying to create a metric of h and t while the values is out of function R. First I have message warning Second, the metric is not created > h <- seq(0.1, 0.9, by=0.1) > t <- seq(0,11000, by=100) > z <- cbind(t) > eta=1 > beta=2 > R <- array (1:1100, dim=