Displaying 20 results from an estimated 10000 matches similar to: "problems with rexp ?"
2002 Sep 23
3
Problems with tcltk package
Hello listers,
I have installed Tcl/Tk v8.4 on my system (Win XP, R 1.5.1). When I try to
load the Tcl/Tk package I get this error:
> library(tcltk)
Error in firstlib(which.lib.loc, package) :
TCL_LIBRARY is not set
Error in library(tcltk) : .First.lib failed
Can someone help me, please?
Thanks,
Juan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
2002 Jun 11
3
show messages during a long process
Hi,
I have a function which takes some time to execute (20 sec.) and I want to
show the progress of the execution with simple messages such as "10% done",
"20% done", ... (with a simple "cat" function). The problem is that all the
messages appear together when the execution of the function is over. How can
I show each message at their corresponding time?
Thanks,
2002 Apr 11
6
extract week from date
Hello R-users,
Does anyone know how obtain the week of a date?
(in SPPS the instruction is "xdate.week")
Thanks,
Juan Ramon
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the
2012 Jan 27
3
generate a random number with rexp ?
dear list
I use runif to generate a ramdom number between min and max
runif(n, min=0, max=1)
however , the syntaxe of rexp does not allow that
rexp(n, rate = 1)
and it generate a number with the corresponding rate.
The question is: how to generate a number between min and max using rexp().
Regards
--
PhD candidate in Computer Science
Address
3 avenue lamine, cité ezzahra, Sousse 4000
2011 Aug 22
1
d, p, q, r - What are the math relations with each other of this functions?
Hi all,
Using the exponential distribution to exemplify: The dexp function is
the PDF (1) and pexp is the CDF (2), that is obtained integrating the
PDF. How can I get the qexp and the rexp? Considering that I have the
PDF, how this two are mathematically related to the PDF?
(1) ke^{-kx}
(2) 1-e^{kx}
Thanks in advance.
2002 Jun 10
3
%in% in R?
Hi,
Does anyone know if exists a similar funcion to %in% from Hmisc S-plus
library in R?
Thank you
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at
2002 Jun 18
5
insert number in vector
Hello R-users,
I need to create a vector inserting an 1 after each value of another vector.
For example:
vec1<-c(2,3,4)
I need to create a vector with the values 2,1,3,1,4
Does anyone know how create this vector without loops (vec1 could have 1000
elements)
Thank you,
Juan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2006 Feb 03
2
Problems with ks.test
Hi everybody,
while performing ks.test for a standard exponential distribution on samples
of dimension 2500, generated everytime as new, i had this strange behaviour:
>data<-rexp(2500,0.4)
>ks.test(data,"pexp",0.4)
One-sample Kolmogorov-Smirnov test
data: data
D = 0.0147, p-value = 0.6549
alternative hypothesis: two.sided
>data<-rexp(2500,0.4)
2003 Aug 28
2
ks.test()
Dear All
I am trying to replicate a numerical application (not computed on R) from an
article. Using, ks.test() I computed the exact D value shown in the article
but the p-values I obtain are quite different from the one shown in the
article.
The tests are performed on a sample of 37 values (please see "[0] DATA"
below) for truncated Exponential, Pareto and truncated LogNormal
2005 Feb 10
1
rats in survival package
Dear R-listers,
Does anybody know what is the correct source of "rats" dataset in survival package?
The help gives the following information:
Rat data from survival5
Description:
48 rats were injected with a carcinogen, and then randomized to
either drug or placebo. The number of tumors ranges from 0 to 13;
all rats were censored at 6 months after randomization.
2003 Oct 01
1
Acces violation ???
Dear R-listers,
I have created a "dll" and I call it from a R function. However R stops and
shows the message:
"Unhandled exception in Rgui.exe (R.DLL): 0xC0000005: Access Violation"
I get this error in other situations and I solved it verifying that all
parameters are called fine. (e.g., double precision -> as.double, integer ->
as.integer,...). I have verify this.
2008 Mar 21
1
(no subject)
Hi, I am fairly new to R, and am stuck.
I want to write an R function with argument n that returns a vector of length n with n simulated observations from the double exponential distribution with density: ??g(y) = 1/2e^-y
?
For the double exponential, I want to generate y~Exp(1) and then take ?y with probability 0.5
?
Does anyone know how I can do this in R?
Thanks!
Fran
[[alternative
2003 Oct 04
3
a bug of function plot (PR#4405)
Full_Name: Ximing Zhao
Version: R 1.7.1
OS: MacOs X
Submission from: (NULL) (64.136.27.51)
When I used function plot in R 1.7.1, I found two bugs.
My whole function is this:
*****************
drawexp<-function(X,x,c,b){
exp<-function28(X,x,c,b)
if(max(exp)>=max(dexp(x,rate=1))){
plot(x,exp, type="l",main= paste("Exponential ,n=",length(X),"
2004 Oct 27
1
Warning messages in function fitdistr (library:MASS)
Why the warning messages (2:4)?
> x <- rexp(1000,0.2)
> fitdistr(x,"exponential",list(rate=1))
rate
0.219824219
(0.006951308)
Warning messages:
1: one-diml optimization by Nelder-Mead is unreliable: use optimize in: optim(start, mylogfn, x = x, hessian = TRUE, ...)
2: NaNs produced in: dexp(x, 1/rate, log)
3: NaNs produced in: dexp(x, 1/rate, log)
4: NaNs
2006 Aug 15
1
rexp question
I am using rexp to generate several exponential distributions. I am passing
rexp a vector of rates , r. I am wanting to simulate a sample of size 200
for each rate so the code looks like: rexp(n=200*length(r),rate=r) this
gives me a vector of the random exponential variables, but they are all
disjointed b/c rexp goes through and simulates an exponential variable for
each rate and it does that 200
2013 Nov 04
2
transform one probability distribution into another
Hi guys
Given a exponential curve, is there any function on r that can generate exponential distributed random numbers?
in General I want an function that can transform one probability distribution into another??
Regards
******************************************************************
Bander
*************************************
[[alternative HTML version deleted]]
2003 Jan 14
2
graphics landscape orientation
Hello listers,
I would like to know how I can get the resulting graphic of the function
plot.hclust (from the package cluster) in landscape orientation. Is it
possible?
Thanks,
Juan
Latin Hypercube Sampling when parameters are defined according to specific probability distributions
2017 May 27
2
Latin Hypercube Sampling when parameters are defined according to specific probability distributions
>May 26, 2017; 11:41am Nelly Reduan Latin Hypercube Sampling when parameters are >defined according to specific probability distributions
>Hello,
> I would like to perform a sensitivity analysis using a Latin Hypercube Sampling (LHS).
>Among the input parameters in the model, I have a parameter dispersal distance which is defined according to an exponential probability
2002 Jun 19
2
problem with boot
Hello R-users,
I'm using the boot's library. I have two questions:
1. I execute for example
data<-rnorm(100)
boot(data,mean,500)
and I obtain 500 equal bootstrap samples of data. Why?
2. I need to calculate the bootstrap confidence intervals for a statistic,
but when I use the function boot.ci it shows the error message:
Error in if
2018 Apr 04
1
parfm unable to fit models when hazard rate is small
Hello, I would like to use the parfm package: https://cran.r-project.org/web/packages/parfm/parfm.pdfhttps://cran.r-project.org/web/packages/parfm/parfm.pdf in my work. This package fits parametric frailty models to survival data. To ensure I was using it properly, I started by running some small simulations to generate some survival data (without any random effects), and analyse the data using