similar to: integrate() function error

Displaying 20 results from an estimated 8000 matches similar to: "integrate() function error"

2009 Oct 23
1
a problem about integrate function in R .thank you .
e2 <- function(x) { out <- 0*x for(i in 1:length(x)) out[i] <-integrate(function(y) qnorm(y),lower=0,upper=x[i])$value out } integrate(e2,lower=0, upper=a)$value above is my code , when a is small , say a<0.45 the result is right . however , when a>0.5 the result is incorrect . why ? thank you . [[alternative HTML version deleted]]
2009 Feb 27
3
question about 3-d plot
Hi R Users, I have produced a simulated scatter plot of y versus x tightly clustered around the 45 degree line through the origin with the following code: x <- seq(1,100) y <- x+rnorm(100,0,10) plot(x,y,col="blue") abline(0,1) Is there some way to generate a 3-dimensional analogue of this? Can I get a similar simulated scatter plot of points in 3 dimensions where the points
2009 Mar 09
2
mean reverting model
dear useRs, i'm working with a mean reverting model of the following specification: y = mu + beta(x - mu) + errorterm, where mu is a constant currently I estimate just y = x (with lm()) to get beta and then calculate mu = estimated intercept / (1-beta). but I'd like to estimate mu and beta together in one regression-step and also get the test-statistics (including parameter
2010 Jul 06
3
Function for gruping similar variables?
Hi, I have a matrix of results of multiple 2x2 chi^2 tests, non- significant tests are marked as TRUE. Is there a function for grouping those variables in a similar way LSD.test from agricolae library does? I reviewed LSD.test's source but it's not helpful for me. This is my matrix: [,1] [,2] [,3] [,4] [,5] [,6] [,7] 1 TRUE FALSE TRUE TRUE TRUE FALSE TRUE 2 FALSE TRUE
2009 Jun 08
2
Tinn R
Dear R-users, I have installed the latest version of Tinn R (Version 2.2.0.2). With the older versions it was possible to run Tinn R next to R and then select code that one could send to R. Now it seems that one has to start the R gui in Tinn R and then it is possible to select en run code of R. But if I start R within Tinn R it does NOT start the R-Gui but only the R console. When I start R
2008 Dec 10
2
missing argument
Dear list, I have a question and I'm going to give an example of my problem f<- function(d1, d2, d3) { d<- d1*d2/d3 return(d) } v1<- 1 v2<- 2 If I try f(v1, v2, v3) Error in f(v1, v2, v3) : object "v3" not found I obviously got the above error message. I would like to add something to my function to allow me to get a certain value (say zero) if one of the arguments is
2009 May 08
3
'Dynamic' 3D plot
Hi, I am looking for a R package to draw 3d plot. But not in a static way like scatterplot3d or stuff like that. I would like to make rotate the plot, to zoom/unzoom etc..., actually to render the graph 'dynamic'... (for the biologist and bioinformatician, a R package which permitts to reproduce what pdb viewer does). Does a Way exist to do something like that in R ? Thanks,
2008 Dec 15
5
how to create duplicated ID in multi-records per subject dataset
Hi R helpers, If I have a dataset looks like: ID record 1 20 . 30 . 25 2 26 . 15 3 21 4..................... And I want it becomes ID record 1 20 1 30 1 25 2 26 2 15 3 21 4..................... That is, I have to duplicate IDs for those with multiple records. I am wondering it is possible to be
2011 Aug 29
2
rpart: apply tree to new data to get "counts"
Hi, when I have made a decision tree with rpart, is it possible to "apply" this tree to a new set of data in order to find out the distribution of observations? Ideally I would like to plot my original tree, with the counts (at each node) of the new data. Reagards, Jay
2009 Dec 06
5
optim with constraints
Hi, dear R users I am a newbie in R and I wantto use the method of meximum likelihood to fit a Weibull distribution to my survival data. I use "optim" as follows: optim(c(1, 0.25),weibull.like,mydata=mydata,method="L-BFGS-B",hessian = TRUE) My question is: how do I setup the constraints so that the two parametrs of Weibull to be pisotive? Or should I use other function
2009 Mar 07
4
multivariate integration and partial differentiation
Could somebody share some tips on implementing multivariate integration and partial differentiation in R? For example, for a trivariate joint distribution (cumulative density function) of F(x,y,z), how to differentiate with respect to x and get the bivariate distribution (probability density function) of f(y,z). Or integrate f(x,y,z) with respect to x to get bivariate distribution of (y,z). Your
2009 Jul 18
3
how to run the R script in background in Windows XP?
Hello ,everyone. I am a fresh user of R. I wrote several several R script in R with the version 2.9.1 in Windows XP. But I only can run these scrpit via R-GUI. Can anyone tell me how to run the scripts in background without openning R-gui.In another word, run the R-script and get the result via some batch proceesing files or shell scripts directly? Thanks. . -- TANG Jie Email:
2005 Jun 23
3
Automated YUM update kills DNS
We've got several CentOS 3.x systems running DNS that we keep updated automatically via YUM. Recently two of those systems (not all of them) when updating themselves to the latest versions of BIND, automatically replaced /etc/named.conf with a new one and saved the old one as /etc/named.conf.rpmsave. Which of course broke DNS for those servers. All servers got updated, but only two of
2009 Jan 14
2
how to read data from the different worksheets in the same Excel file
Dear All: I am trying to read the data from the different sheet but in the same Excel file. Does R provide this kind of command to do it? Anyone has experience on this? Thanks! Xin [[alternative HTML version deleted]]
2009 Mar 04
2
Multivariate GARCH Package
Good day everyone,   I tried to find a multivariate GARCH package and failed to find one. Although when I searched R I found the following link which describes the package:   http://www.r-project.org/user-2006/Slides/Schmidbauer+Tunalioglu.pdf   can any one help me with this issue.   Thank you in advance [[alternative HTML version deleted]]
2009 Jan 09
1
[R} how to build TermDocMatrix in tm text mining package of R
Howdy Gurus I 'd like to ask a question about how to build TermDocMatrix in tm text mining package. It is not clear about importing a plain text file, and them converting that text file into TermDocMatrix file, etc to me. How can I build a TermDocMatrix of " a plain text document file for text association? Or are there any good manuals? Thank you in advance, -- Kum-Hoe Hwang, Ph.D.
2008 Jan 31
2
Box Plot With Groups being numbers
I would like to Summarize values that are repeated measures at a certain river mile with box plot i.e. The data matrix looks like this 123 124 125 #fiver mile 0.5 0.6 0.7 0.4 0.5 0.6 ... ... ... #values I would like to make a boxplot with the river mile naming the different box plot. How do you suppress the X123? Stephen -- Let's not
2008 Nov 25
2
invoking user-defined function
Dear list, Can somebody tell me how to invoke user-defined functions from script files during run-time? Basically I have (almost) one function per script file. I am thinking of something like #include in C++ import in Java/Python use in Perl No, I don't need my functions every time R is started. Neither I am thinking about writing building my functions into packages. I just
2009 Jan 27
1
WhisperStation R
What do you think of this: http://www.microway.com/whisperstation/whisperstation-r.html I'm considering ditching my Windows Vista 2 GB RAM computer for WhisperStation R using Debian 64-bit Linux with 32 GB RAM and setting the whole thing up for R and WinBUGS. I put in a price request, but I know nothing about Linux, or WhisperStation R for that matter, and am really curious what you think?
2009 Feb 13
2
copy directory command
Hi, I was trying to copy a directory from one location to another. Is there a command to do this (similar to the file.copy command)? thanks! [[alternative HTML version deleted]]