Displaying 3 results from an estimated 3 matches for "sampwb".
2010 Sep 20
1
Removing slected values from original vector and definning new vector with the rest?
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 included at Censored.data?
[[alternative HTML version...
2010 Sep 19
1
Weibull- Random Censoring
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 to be included in the subvector.
2010 Sep 16
1
Weibull simulation- number of items to replace is not a multiple of replacement length
...,
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)
> for ( p in 1:2) {
+ sampleSize <- 20
+ shape.true <- 1.82
+ scale.true <- 987
+ sampWB <- urweibull(sampleSize, shape=shape.true, scale=scale.true, lb=0, ub=Inf)
+ sampWBmleWB <- weibullMLE(sampWB)
+ est[p]= sampWBmleWB$estimate
+ se [p]= sampWBmleWB$s
+ }
Warning messages:
1: In est[p] = sampWBmleWB$estimate :
number of items to replace is not a multiple of replacement lengt...