[R] could not find function "flexsurvreg"

2022-10-01 Thread Shah Alam
why is it not working? Best regards, Shah [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-projec

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

2021-08-19 Thread Shah Alam
Dear All, Thanks a lot for your valuable suggestions. I am going to implement one by one. Jan: Yes, I am using the "doParallel" package for parallelization. I will let you know the results after implementing all the given suggestions. Best regards, Shah On Thu, 19 Aug 2021 at 11:5

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

2021-08-19 Thread Shah Alam
: Call those functions. Step 4: model results. I close the R session and run the code from step 1. I get different results for the same set of values for parameters. Best regards, Shah On Thu, 19 Aug 2021 at 09:56, PIKAL Petr wrote: > Hi > > Please provide at least your code prefer

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

2021-08-19 Thread Shah Alam
getting different results. Is there any problem with the set.seed. I assume the set.seed should produce the same results. I used set.seed(1234). Best regards, Shah [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To

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

2021-04-19 Thread Shah Alam
te vector 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 ht

Re: [R] LHS random number generator

2021-04-13 Thread Shah Alam
variables/inputs. Best regards, Shah On Tue, 13 Apr 2021 at 09:02, Jim Lemon wrote: > Hi Shah, > I think what you are struggling toward is this: > > prior_lhs <- list(r_mu=c( 0.00299, 0.0032), > r_sd=c( 0.001, 0.002), >

[R] LHS random number generator

2021-04-12 Thread Shah Alam
[2]) + (as.numeric(prior_lhs[[j]][3]) - as.numeric(prior_lhs[[j]][2])) * random_tab[lhs_index, j] } param <- rbind(param, temp_par) lhs_index <- lhs_index+1 } param <- param[-1,] Best regards, Shah [[alternative HTML version deleted]] _

[R] Optimization function producing negative parameter values

2021-03-21 Thread Shah Alam
tion, and upper-lower bounds to stop producing negative values during parameter search? Thanks Best regards, Shah [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/ma

[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 3)

[R] Need Help To Solve An Equation In R

2017-05-27 Thread Neetu Shah
I integrated a function with respect to y and there would be an unknown h that I need to find. I need to equate this lhs to p_star value in order to find h. Which function should I use to solve this equation? Please guide me regarding this. Thank you. -- With Regards, Neetu Shah, B.Tech.(CS),

[R] Better scrolling feature in ggplot using Shiny???

2016-01-04 Thread Kunal Shah
Hello, I have plotted a ggplot of large data around 3 points. I opened it in Shiny. I want a scrolling feature so that I can just scroll the data. I tried to write a code in Shiny where the user can select the slider range. But "scrolling" by that is not efficient and not at all smooth Any h

[R] Web/Server Interface for R files

2015-07-06 Thread Kunal Shah
Hello, I have the following code From excel.link package xl.workbook.activate("ADSnippetXLS.xlsx") source('ActiveDeltaSnippet2.R') "ActiveDeltaSnippet2.R" takes data from ADSnippetXLS, performs some computations on the data and outputs the data back into "ADSnippetXLS.xlsx" I dont w

Re: [R] Post-hoc tests on Split-plot design

2015-05-13 Thread Shah
his stage I shall highly appreciate your further assistance. Thanks. Shah -- View this message in context: http://r.789695.n4.nabble.com/Post-hoc-tests-on-Split-plot-design-tp4707106p4707165.html Sent from the R help mailing list archive at Nabble.com. ___

[R] Dx accuracy measures from raw data

2014-07-23 Thread Anoop Shah
there was a more efficient way to get these results from the raw data in R. Hope I have explained my self clearly and thanks a lot in advance!! Cheers Anoop Dr Anoop Shah Cardiology Research fellow Centre of Cardiovascular sciences Chancellors Building Room SU 305 University Of Edinburgh Little

[R] dx accuracy measures from raw data

2014-07-20 Thread Anoop Shah
Hello R users! I am a medic and have been working with R for about 6 months now. I was hoping to pick someone’s brain about a diagnostic accuracy study that has now been completed. I am trying to derive the sensitivity, specificity, NPV and PPV with the corresponding 95% CI from the raw data.

[R] How does R determine best value of alpha in forecasting

2014-01-30 Thread neel shah
Hi I need to implement Holt-Winter's Exponential Smoothing in my project. I was going through implementation of Holt-Winter's Exponential Smoothing in forecast package. I would appreciate if someone can explain how R finds best value of alpha and beta given the dataset. It ll be great if someone c

[R] Function storing error messages in 32 bit R-2.15.2 version

2012-11-20 Thread Maulik Shah
\\testFile.txt") > params<-tpm(resp) >warnings() NULL Thanks and regards, Maulik Shah [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the po

[R] R Help

2012-03-31 Thread Jaymin Shah
Hi, I have a polynomial of 2n^2-5n+3 and I have my n values going up in powers of 2 i.e. n=2,4,8,16….. I wanted to fit this curve to the function A*n*log2(n) +B*n where A and B are to be found. How would i do this? Thank you Jaymin __ R-help@r-

Re: [R] Help needed please

2012-02-25 Thread Jaymin Shah
I was wondering how to make a function which minimises a vector (a,b,c,d). I have an equation ( for simplicity) say its 5 -(3a+4b+6c+8d) and i want to make this equation as small as possible. Thus need to find the values for a b c and d for which this happens. I know there is a function in r

[R] Help needed please

2012-02-10 Thread Jaymin Shah
I have coded a time series from simulated data: simtimeseries <- arima.sim(n=1024,list(order=c(4,0,0),ar=c(2.7607, -3.8106, 2.6535, -0.9258),sd=sqrt(1))) #show roots are outside unit circle plot.ts(simtimeseries, xlab="", ylab="", main="Time Series of Simulated Data") # Yule --

[R] Help need

2012-02-07 Thread Jaymin Shah
I have mad a for loop to try and output values which i have named spectrum. However, I cannot seem to get the answers to come out as a vector which is what i need. They come out as separate values which I am then unable to join together. Thank you for(f in seq(0,0.5,0.1)) { sigmasqaure

[R] (no subject)

2011-02-26 Thread Hamaad Shah
me out here I would appreciate it. Thanks, Hamaad Musharaf Shah. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] Capturing error messages while running R through an external program

2011-01-09 Thread Maulik Shah
I am trying to automate scoring done by applying 3 parameter model of IRT to the response data. I call R from PHP to do this using exec(). Since I face convergence issues while using R, it is important that the program captures the error messages like "the solution is not stable" given by R while r

[R] Getting stable solution while applying 3 parameter model (tpm) on response data

2011-01-09 Thread Maulik Shah
I have started exploring potential of R in applying IRT to a dataset. I have a data of about 20k students who took a Maths test, a diagnostic in nature. I find that I don't get stable solution while using tpm() even after passing an argument "start.val = RANDOM". What should be done in this case t

Re: [R] Passing the parameter (file name) to png()

2010-07-05 Thread Maulik Shah
Thanks a lot! Regards, Maulik On Sat, Jun 26, 2010 at 4:43 AM, jim holtman wrote: > b <- paste("C:\\rphp\\",arg, sep='') > > On Sat, Jun 26, 2010 at 12:55 AM, Maulik Shah > wrote: > > I am fitting 3 parameter model to my response matrix and want to gen

[R] Passing the parameter (file name) to png()

2010-06-26 Thread Maulik Shah
I am fitting 3 parameter model to my response matrix and want to generate item characterstic curve. I want to specify file name to save item characterstic curve by passing it as external parameter to the R batch script. The following is the code I have written for this. *R Script:* library(ltm) c

[R] Plot ICC one item each in ltm

2010-05-20 Thread Maulik Shah
May I ask for the help on how to plot Item characteristic curve (ICC) one item each. I have fit 3 parameter model for a test with 40 items.Currently I get ICC for all the 40 items in a single graph making it difficult to interpret. Thanks and Regards, -- Maulik Shah [[alternative HTML

[R] Using ltm to calculate ability values of 20k students and getting the output

2010-05-19 Thread Maulik Shah
itite; solution is unstable." What could be the reason for this? - Can I run R script from PHP? Regards, Maulik Shah [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA

[R] Peculiar behaviour with MatchIt and a function

2010-04-11 Thread Ajay Shah
12L, 8L, 5L, 5L, 10L, 1L, 1L, 4L, 2L, 13L, 13L, 1L, 1L, 5L, 12L, 5L, 10L, 4L, 1L), .Label = c("Chemicals", "Diversified", "Electricity", "Food", "Machinery", "Metals", "Mining", "MiscManuf", "NonMetalMin",

[R] Bug in ecdf? Or what am I missing?

2010-02-27 Thread Ajay Shah
rning message: In xy.coords(x, y, xlabel, ylabel, log) : 1 x value <= 0 omitted from logarithmic plot This seems to be an error since all the values in x are positive. Thanks, -- Ajay Shah http://www.mayin.org/ajayshah aj

Re: [R] [R-SIG-Finance] Sequential MLE on time series with rolling window

2009-11-03 Thread Ajay Shah
ons n to n+T and use it as the starting value for estimation from observations (n+1) to (n+T+1). The two $\hat theta$ values should be similar to each other, hence just one or two iterations should be required in making each step. -- Ajay Shah h

[R] How do I access with the name of a (passed) function

2009-10-17 Thread Ajay Shah
How would I do something like this: f <- function(x, g) { s <- as.character(g) # THIS DOES NOT WORK sprintf("The %s of x is %.0f\n", s, g(x)) } f(c(2,3,4), "median") f(c(2,3,4), "mean") and get the results "The median of x is

[R] Bootstrap inference for the sample median?

2009-08-30 Thread Ajay Shah
om values which are all lower than 1, then any sample median of these bootstrap samples should be lower than 1. The upper cutoff of the 95% confidence interval should also be below 1. Is this a bug in the boot package? Or should I be using `Percentile' or `BCa' in t

[R] Better weight management / weight loss through science

2009-08-22 Thread Ajay Shah
Folks, I wrote some text and code to help people think more clearly about weight loss or weight management. This is at: http://www.mayin.org/ajayshah/MISC/weightloss.html I hope this is useful to others. Do tell me if there are things there which I can improve. -- Ajay Shah

Re: [R] survdiff for left-truncated data?

2009-08-05 Thread Rajen Shah
Thank you very much that's perfect. Rajen 2009/8/4 Terry Therneau > > Does anyone know if there is a function like survdiff which can also > handle > > left-truncated and right-censored data? When I use it on left-truncated > and > > right-censored data I get an error message saying Right censo

[R] survdiff for left-truncated data?

2009-08-03 Thread Rajen Shah
Hi Does anyone know if there is a function like survdiff which can also handle left-truncated and right-censored data? When I use it on left-truncated and right-censored data I get an error message saying Right censored data only. Many thanks Rajen [[alternative HTML version deleted]]

Re: [R] How to do a pretty panel plot?

2009-05-14 Thread Ajay Shah
=1) box(col = "grey") ## Adjust par(mar) for 2nd plot par(mar=c(2,4,0,1)) ## Second plot plot(M$date, M$cospi.PE, type="l", col="black", log="y", xaxs="i", yaxs="i", axes=F, lwd=2, ylab="Cospi

[R] How to do a pretty panel plot?

2009-05-14 Thread Ajay Shah
-- and this is clearly all wrong. * It's supposed to look like one rectangle inside which are two plots. Instead it looks like two separate plots. * The x axis is Dates and the axis labelling doesn't get that. How do I set about making a pretty panel plot of these two series, both of

[R] Stuck on building a package

2009-03-15 Thread Ajay Shah
om package:base : as.Date.numeric Error in parse(n = -1, file = file) : unexpected end of input at 63: ft=winsorised.left, winsorised.right=winsorised.right) 64: } Calls: -> code2LazyLoadDB -> sys.source -> parse Execution halted ERROR: lazy loading failed for package &

[R] Please help me to understand environments

2009-03-15 Thread Ajay Shah
I want to write: zap <- function(v) { if (exists(v)) {rm(v)} } But of course this doesn't work because the rm() acts on v which is within zap() and doesn't affect the parent environment: > x <- 1 > zap("x") > x [1] 1 How would I make this

[R] cbind(NULL,zoo.object)?

2009-03-14 Thread Ajay Shah
tors are of different classes: integer Date Is there an easy workaround; or am I deeply confused; is there a way out? :-) -- Ajay Shah http://www.mayin.org/ajayshah ajays...@mayin.org http://ajayshah

[R] quartz options not permanent

2009-01-14 Thread Premal Shah
Hi all, I use a mac and was trying to reset my quartz options. However, every time I restart R, the options are gone and I have to type them again. Any idea as to what's going wrong? Thanks, Premal __ R-help@r-project.org mailing list https://stat

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread Ajay Shah
b, well then you should by all > means use Matlab. A good chunk of statistical computation involves loops. We are all happy R users. I was surprised to see that we are so far from matlab in the crucial dimension of performance. -- Ajay Shah http://www.may

Re: [R] R badly lags matlab on performance?

2009-01-03 Thread Ajay Shah
On Sat, Jan 03, 2009 at 06:59:29PM +0100, Stefan Grosse wrote: > On Sat, 3 Jan 2009 22:25:38 +0530 Ajay Shah wrote: > > AS> system.time(for (i in 1:1000) {a[i] <- a[i] + 1}) > > AS> I wonder what we're doing wrong! > > it is no secret that R doe

[R] R badly lags matlab on performance?

2009-01-03 Thread Ajay Shah
0.0671.5x For loop version0.099242.209 425.5x So the R is 1.5x costlier for the vector version and 425.5x costlier with matlab. I wonder what we're doing wrong! -- Ajay Shah http://www.mayin

[R] Question about regression without an intercept

2008-12-27 Thread Ajay Shah
t is absent. -- Ajay Shah http://www.mayin.org/ajayshah ajays...@mayin.org http://ajayshahblog.blogspot.com <*(:-? - wizard who doesn't know the answer. __ R-help@r-

[R] "Heuristic optimisation"?

2008-10-15 Thread Ajay Shah
I wondered was people on this list felt about this article: http://www.voxeu.org/index.php?q=node/2363 which talks about the problems of obtaining sound answers in numerical optimisation in settings such as MLE or NLS. -- Ajay Shah http://www.mayin.org

[R] Puzzled at generating combinations

2008-03-18 Thread Ajay Shah
there's a clean way to do it but I find myself thinking in loops. -- Ajay Shah http://www.mayin.org/ajayshah [EMAIL PROTECTED] http://ajayshahblog.blogspot.com <*(:-? - wizard who doesn

[R] How does one do simple string concatenation?

2008-03-17 Thread Ajay Shah
How does one convert objects c("a","b","c") and "d" into "abcd"? > paste(c("a","b","c"), "d") of course yields [1] "a d" "b d" "c d" -- Ajay S

Re: [R] Reading microsoft .xls format and openoffice OpenDocument files

2008-03-11 Thread Ajay Shah
On Tue, Mar 11, 2008 at 08:57:49AM +0100, Hans-Peter wrote: > > > > I looked at the package (it's > > http://cran.r-project.org/web/packages/xlsReadWrite/index.html) but > > it's windows only. So no joy yet. > > which platform would you need

Re: [R] Reading microsoft .xls format and openoffice OpenDocument files

2008-03-10 Thread Ajay Shah
tension that sounds similar to R-Excel > (connecting R to Calc). Not sure if that helps you any though. I wasn't able to locate this. Could you please describe this further? -- Ajay Shah http://www.mayin.org/ajayshah [EMAIL PROTECTED]

[R] Reading microsoft .xls format and openoffice OpenDocument files

2008-03-07 Thread Ajay Shah
roach this? Am I correct in thinking that our goal is reading OpenDocument files (http://en.wikipedia.org/wiki/OpenDocument) ? -- Ajay Shah http://www.mayin.org/ajayshah [EMAIL PROTECTED] http://ajayshahblog.blogspot.com <*

[R] New data source - now how do we build an R interface?

2008-03-05 Thread Ajay Shah
URLs which can then be wget. There's some javascript going on that I'm not understanding. Perhaps someone on the mailing list can think about this? -- Ajay Shah http://www.mayin.org/ajayshah [EMAIL PROTECTED]

[R] ipf function in R

2008-03-05 Thread Chandra Shah
invoke ipf in R to obtain an updated contingency table? Thanks. By the way I am quite new to R. -- Dr Chandra Shah Senior Research Fellow Monash University-ACER Centre for the Economics of Education and Training Faculty of Education, Building 6, Monash University Victoria Australia 3800 Tel. +61 3

[R] Code for articles in R news?

2007-12-19 Thread Ajay Shah
I went to the article on np in R news 7/2 (October 2007). What's the general technique to get the source code associated with the article as a .R file that I can play with? -- Ajay Shah http://www.mayin.org/ajayshah [EMAIL PROT

[R] Help Required

2007-11-21 Thread Kushal M Shah
Hi Friends I am working on a Financial Model project in R and require help in writing code for Moving Averages. Since I am very new to R, it would be good if any seniors in the group can guide me on a proper moving average code. Thanks & Best Regards, Kushal The information in thi

[R] How do I obtain the design matrix of an lm()?

2007-10-10 Thread Ajay Shah
I could, of course, do this manually. But it seems that lm() has done all this hard work. I wonder if there's a way to ask him nicely so as to get it. :-) -- Ajay Shah http://www.mayin.org/ajayshah [EMAIL PROTECTED]