[R] could not find function "flexsurvreg"

2022-10-01 Thread Shah Alam
Dear All, I am analyzing trial data for survival. During the loading of the R package "flexsurv", the following error message appeared. "Loading required package: survival Error: package or namespace load failed for ‘flexsurv’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck =

Re: [R] Getting different results with set.seed()

2021-08-19 Thread Shah Alam
Petr wrote: > > Hi > > > > Did you try different order? > > > > Step 2: set.seed (123) > > > > Step 1. Self-coded functions (these functions generate random numbers as > well) > > > > Step 3: Call those functions. > > > > Step 4: mod

Re: [R] Getting different results with set.seed()

2021-08-19 Thread Shah Alam
> > Cheers > Petr > > > -Original Message- > > From: R-help On Behalf Of Shah Alam > > Sent: Thursday, August 19, 2021 9:46 AM > > To: r-help mailing list > > Subject: [R] Getting different results with set.seed() > > > > Dear All, > &

[R] Getting different results with set.seed()

2021-08-19 Thread Shah Alam
Dear All, I was using set.seed to reproduce the same results for the discrete event simulation model. I have 12 unknown parameters for optimization (just a little background). I got a good fit of parameter combinations. However, when I use those parameters combinations again in the model. I am

[R] What is an alternative to expand.grid if create a long vector?

2021-04-19 Thread Shah Alam
ector of size 1.0 Gb* What is an alternative to expand.grid if create a long vector based on 10 elements? With kind regards, Shah Alam [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat

Re: [R] LHS random number generator

2021-04-13 Thread Shah Alam
:length(prior_lhs)) > prior_lhs[[i]]<-seq(prior_lhs[[i]][1],prior_lhs[[i]][2],length.out=4) > > This gives you the "quartiles" you need for randomLHS function in the > "lhs" package if I read the help page correctly. > > Jim > > On Mon, Apr 12, 2021 a

[R] LHS random number generator

2021-04-12 Thread Shah Alam
Hello everyone, I am using the LHS package to generate a combination of a set of parameter values. However, I am not sure how to fix some parameter values to 2 decimal points. For example: I want to make combinations in such a way that values for parameter c("lmp", 0.40, 0.43) are taken as 0.40,

[R] Optimization function producing negative parameter values

2021-03-21 Thread Shah Alam
Dear all, I am using optim() to estimate unknown parameters by minimizing the residual sums of squares. I created a function with the model. The model is working fine. The optim function is producing negative parameter values, even I have introduced upper and lower bounds (given in code).

[R] Warning messages while parallel computing

2021-03-04 Thread Shah Alam
closing unused connection 14 Warning in for (i in seq_len(Ne + echo)) { : closing unused connection 13 Warning in for (i in seq_len(Ne + echo)) { : closing unused connection 12 Best regards, Shah Alam [[alternative HTML version deleted]] __ R

[R] Probabilities in discrete event simulation model in R

2020-07-16 Thread Shah Alam
I am designing a programme in R to simulate two events that are 1. a person gets cancer, or 2. die of other causes. I have data for the probability of getting cancer by age and probability of death due to causes other than cancer. 1. My dataset has 3 columns 1) age 2) prob getting cancer