[R] tutorials on bootstrap, jackknife, permutation, randomization tests

2017-02-26 Thread Bogdan Tanasa
Dear all, please could anyone recommend a good website/resource describing tutorials on bootstrap, jackknife, permutation, and randomization tests in R, with applications to biology (molecular biology). thanks, -- bogdan [[alternative HTML version deleted]] _

Re: [R] order.by requires an appropriate time-based object

2017-02-26 Thread Joshua Ulrich
Please provide a minimal, reproducible example. It's really hard for someone to help you if you give them nearly 100 lines of code and no data. My guess is that data[,1] is character (or factor) and you need to convert it to Date or POSIXct. On Sun, Feb 26, 2017 at 9:24 AM, Allan Tanaka wrote:

Re: [R] Reading S-plus data in R

2017-02-26 Thread William Dunlap via R-help
> It stores the objects it reads from the file 'file' in the environment 'env'. > > data.restore4 <- function(file, print = FALSE, verbose = FALSE, env = .GlobalEnv) It returns NULL. foreign::data.restore() returns the 'file' argument and I should have copied that behavior (even though it is not

[R] Theta in Negative binomial GAM

2017-02-26 Thread Eva Maria Leunissen
Hi, I'm fitting a negative binomial GAM (using mgcv) to my data using family=nb() so theta is estimated during the fitting process. When I then extract this theta from the model and refit the same model with family=negbin(theta) it gives a much lower AIC. I know using AIC to compare negative binomi

Re: [R] Reading S-plus data in R

2017-02-26 Thread roslinazairimah zakaria
Hi all, Something is working but the data is NULL. I tried this: library(foreign) > dt <- data.restore4("C:/Users/FTSI/Desktop/2 ICGPA/1ACTIVITY.sdd") > head(dt); tail(dt) NULL NULL On Mon, Feb 27, 2017 at 12:57 AM, William Dunlap wrote: > You should be looking for foreign::data.restore, not

Re: [R] Reading S-plus data in R

2017-02-26 Thread Richard M. Heiberger
Bill, this looks good. Can you add it to the splus2R package? Rich On Sun, Feb 26, 2017 at 11:57 AM, William Dunlap via R-help wrote: > You should be looking for foreign::data.restore, not data.dump nor read.S. > > In any case, I think that foreign::data.restore does not recognize S-version4

[R] order.by requires an appropriate time-based object

2017-02-26 Thread Allan Tanaka
HiNot sure why i get error like this: Error in xts(forecasts, dates[(window.length):length(returns)]) :   order.by requires an appropriate time-based object I have researched for the answer that i need to convert returns into time series. I did that but still it doesn't work?See attached for fil

Re: [R] Reading S-plus data in R

2017-02-26 Thread William Dunlap via R-help
You should be looking for foreign::data.restore, not data.dump nor read.S. In any case, I think that foreign::data.restore does not recognize S-version4 data.dump files, ones whose first line is ## Dump S Version 4 Dump ## Here is a quickly written and barely tested function that should read dat

Re: [R] Reading S-plus data in R

2017-02-26 Thread roslinazairimah zakaria
Hi Michael, Yes, I did tried and still got error: > library(foreign) > data.dump(oldStyle=TRUE) Error in eval(expr, envir, enclos) : could not find function "data.dump" > source(.trPaths[5], echo=TRUE, max.deparse.length=150) > read.S(file.path("C:/Users/FTSI/Desktop/2 ICGPA/1ACTIVITY.sdd")) E

Re: [R] Reading S-plus data in R

2017-02-26 Thread Michael Dewey
Did you do library(foreign) first? On 26/02/2017 07:23, roslinazairimah zakaria wrote: Hi William, Thank you so much for your reply. However, I still got error message: data.dump(oldStyle=TRUE) Error: could not find function "data.dump" data.restore("C:/Users/FTSI/Desktop/2 ICGPA/1ACTIVITY

Re: [R] non-linear optimisation ODE models

2017-02-26 Thread Thomas Petzoldt
Hi, fitting ODE models may also be done with package FME, see: Soetaert K, Petzoldt T. Inverse modelling, sensitivity and Monte Carlo analysis in R using package FME. Journal of Statistical Software. 2010(33): 1–28. http://dx.doi.org/10.18637/jss.v033.i03 or the (interactive) poster at: htt

Re: [R] Differential equations

2017-02-26 Thread Thomas Petzoldt
Hi, yes, the suggestion of Peter Dalgaard is correct, and it can also be done using the "event" mechanism of deSolve, see: library("deSolve") ?events ... or the slides from our talk given at useR-2011 http://desolve.r-forge.r-project.org/slides/petz_soet2011.pdf ... or the tutorial from L.A

Re: [R] Why the slope and intercept of 95% CI varies at each calculation when using package mcr?

2017-02-26 Thread peter dalgaard
Because they are bootstrap based. -pd > On 26 Feb 2017, at 08:51 , vod vos wrote: > > > Hi Everybody, > > aa<- > c(1,5,10,20,50,40,50,60,70,80,90,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1000) > bb<- > c(8,16,30,24,39,54,40,68,72,62,122,80,181,259,275,380,320,

Re: [R] Why the slope and intercept of 95% CI varies at each calculation when using package mcr?

2017-02-26 Thread Rui Barradas
Hello, I know nothing about package mcr but by reading the help page for function mcreg I conclude that CI's are calculated using a bootstrap resampling technique and therefore you should expect different values every time the function runs unless you set the random generator seed using ?set.