search for: qunif

Displaying 20 results from an estimated 39 matches for "qunif".

Did you mean: runif
2006 Jun 11
0
qunif() behavior with Inf arguments (PR#8958)
Full_Name: Rob Carnell Version: 2.3.0 OS: Windows XP sp 2 Submission from: (NULL) (131.167.72.220) Thank you for all you work on R project! I noticed the following behavior today. It is what I believe to be an inconsistency. > qunif(.5, 0, Inf) [1] Inf > qunif(.5, -Inf, 1) [1] NaN Warning message: NaNs produced in: qunif(p, min, max, lower.tail, log.p) I believe they should yield the same result, which is whatever you feel most appropriate. I think that arguments can be made for either. The lower.tail parameter does not...
2013 Oct 08
3
Latin Hypercube Sample and transformation to uniformly distributed integers or classes
...g list ( https://stat.ethz.ch/pipermail/r-help/2011-June/279931.html): Easy Example Parameter 1: normal(1, 2) Parameter 2: normal(3, 4) Parameter 3: uniform(5, 10) require(lhs) N <- 1000 x <- randomLHS(N, 3) y <- x y[,1] <- qnorm(x[,1], 1, 2) y[,2] <- qnorm(x[,2], 3, 4) y[,3] <- qunif(x[,3], 5, 10) par(mfrow=c(2,2)) apply(x, 2, hist) par(mfrow=c(2,2)) apply(y, 2, hist) However, some of my parameters are uniformly distributed integer values and/or uniformly distributed classes. So, for example one input parameter can be "yellow", "green", "red" w...
2013 Jun 07
1
It seams that fast99 function (sensitivity package) does not work out for norm distribution.
...inputs? See the simple example given following. Any suggestion will be greatly appreciated. Thank you! Marino # Simple example # 1. uniform version (It works well) library(sensitivity) Myfun<-function(x){return(rowSums(x))} SA1 <- fast99(model = Myfun, factors = 3, n = 1000, q = "qunif", q.arg = list(min = 0, max = 1)) > SA1 Call: fast99(model = Myfun, factors = 3, n = 1000, q = "qunif", q.arg = list(min = 0, max = 1)) Model runs: 3000 Estimations of the indices: first order total order X1 0.3335243 0.3350584 X2 0.3335243 0.3350584 X3 0.3335...
2007 Jul 13
1
ggplot usage question
Could someone show me how to get a blue line in this plot? > ggplot(movies, aes(x=rating)) + stat_qq(geom="line", quantiles=seq(0,1,0.005), distribution=qunif) I've tried many permutations but cannot seem to find the right combination. I've tried these flavors: > ggplot(movies, aes(x=rating)) + stat_qq(geom="line", colour="blue", quantiles=seq(0,1,0.005), distribution=qunif) > ggplot(movies, aes(x=rating)) + laye...
2010 Feb 13
1
Highlighting points in a quantile plot for different values of a second column
Hello, I have the following data frame, using lattice and qqmath, how do I display the quantile plot (e.g distribution = qunif), but highlight the f==TRUE and f==FALSE differently? library(lattice) pp <- function(n) ((1:n)-0.5)/n x=data.frame(x=runif(20),f=sapply(runif(20),function(r) r>0.5)) I would like a single curve, the following example displays two curves. qqmath(~x,groups=f,data=x,distribution=qunif,f.val...
2007 Jan 23
1
How to generate 'minor' ticks in lattice (qqmath)
...umy=100 y=runif(numy,min=0,max=1) sig=0.05 numsig=length(which(y<sig)) tck.no=11 # number of ticks tcks=1:tck.no labl=as.character(0.1*tcks-0.1) # label for all ticks labl[seq(2,tck.no-1,2)]="" # delete every second label nums=seq(0,(tck.no-1)/10,(tck.no-1)/100) qqmath(y,distribution=qunif, prepanel=NULL, panel=function(x) { panel.abline(c(0,1),lty=2) panel.polygon(c(0,0,numsig/numy,numsig/numy,0),c(0,sig,sig,0,0),lwd=0.75) panel.qqmath(x,distribution=qunif,col=1) }, scales=list( tck=c(1,0), x=list(at=nums,labels=labl), cex=0.8), xla...
2017 Jun 01
1
Latin Hypercube Sampling when parameters are defined according to specific probability distributions
...I use your code to apply my model to each of the 50 rows of the data frame ?tabLHS?? Given that one row corresponds to one model simulation, I should have a value generated by the LHS for all distance classes at the first line of the data frame. library(pse) q <- list("qexp", "qunif", "qunif") q.arg <- list(list(rate=exponential_rate), list(min=0, max=1), list(min=0, max=1)) uncoupledLHS <- LHS(model=model_function, input_parameters, N, q, q.arg) hist(uncoupledLHS$data$dispersal_distance, breaks=10) tabLHS <- get.data(uncoupledLHS) Sorry, it?s the f...
2017 May 27
2
Latin Hypercube Sampling when parameters are defined according to specific probability distributions
...ce"], rate=exponential_rate) hist(Y[,1], breaks=10) # you can transform the other marginals as required and then assess function sensitivity model_function <- function(z) z[1]*z[2] + z[3] apply(Y, 1, model_function) # now, trying to use pse library(pse) q <- list("qexp", "qunif", "qunif") q.arg <- list(list(rate=exponential_rate), list(min=0, max=1), list(min=0, max=1)) uncoupledLHS <- LHS(model=model_function, input_parameters, N, q, q.arg) hist(uncoupledLHS$data$dispersal_distance, breaks=10) Rob
2008 Aug 21
1
pnmath compilation failure; dylib issue?
...plnorm.o plogis.o pnbeta.o pnbinom.o pnchisq.o pnf.o pnmath.o pnorm.o pnt.o polygamma.o ppois.o pt.o ptukey.o punif.o pweibull.o qbeta.o qbinom.o qcauchy.o qchisq.o qexp.o qf.o qgamma.o qgeom.o qhyper.o qlnorm.o qlogis.o qnbeta.o qnbinom.o qnchisq.o qnf.o qnorm.o qnt.o qpois.o qt.o qtukey.o qunif.o qweibull.o sign.o stirlerr.o toms708.o -lgomp -F/Library/Frameworks/R.framework/.. - framework R -Wl,-framework -Wl,CoreFoundation ld: warning, duplicate dylib /Developer/SDKs/MacOSX10.4u.sdk/usr/local/ lib/libgcc_s.1.dylib ** arch - ppc ... gcc -arch ppc -isysroot /Developer/SDKs/MacOSX10.4...
2017 Jun 01
0
Latin Hypercube Sampling when parameters are defined according to specific probability distributions
...ply my model to each of the 50 rows of the data frame ?tabLHS?? Given that one row corresponds to one model simulation, I should have a value generated by the LHS for all distance classes at the first line of the data frame. > > > > library(pse) > q <- list("qexp", "qunif", "qunif") > q.arg <- list(list(rate=exponential_rate), list(min=0, max=1), > list(min=0, max=1)) > uncoupledLHS <- LHS(model=model_function, input_parameters, N, q, q.arg) > hist(uncoupledLHS$data$dispersal_distance, breaks=10) > > tabLHS <- get.data(uncou...
2008 May 23
1
Question about Runuran (Triangular Distribution)
The Runuran package includes a simulation for the Triangular Distribution, urtriang. But I didn't find an analogue of the q* functions (rnorm - qnorm, runif - qunif), that would invert the CDF (?uqtriang). Are there any such functions? Alberto Monteiro
2007 Jan 22
1
Latin hyper cube sampling from expand.grid()
Dear R experts I am looking for a package which gives me latin hyper cube samples from the grid of values produced from the command "expand.grid". Any pointers to this issue might be very useful. Basically, I am doing the following: > a<-(1:10) > b<-(20:30) > dataGrid<-expand.grid(a,b) Now, is there a way to use this "dataGrid" in the package
2013 Mar 13
1
saving vector output as numeric
...max T1 1.500000e+01 3.999954e+01 SE1 0.000000e+00 1.000000e+00 PRE 0.000000e+00 1.000000e+00 WET 0.000000e+00 5.980000e+00 BE1 4.664642e+00 5.866620e+00 Kappa1 5.500000e+03 2.000000e+04 Kappa3 1.000000e+04 2.000000e+04 Then I created a latin hypercube set using (qunif(x[,i], minmaxfunc$min[i], minmaxfunc$max[i]). The new data frame looks as follows: T1 SE1 PRE WET BE1 Kappa1 Kappa3 1 31.35590 0.7066388715 0.8665111432 4.965701530 5.783424 12240.019 12675.12 2 28.27640 0.5442730461 0.70...
2009 Mar 17
3
R does not compile any more on FreeBSD 8.0-CURRENT
...n.o imax2.o imin2.o chebyshev.o log1p.o expm1.o lgammacor.o gammalims.o stirlerr.o bd0.o gamma.o lgamma.o gamma_cody.o beta.o lbeta.o polygamma.o bessel_i.o bessel_j.o bessel_k.o bessel_y.o choose.o snorm.o sexp.o dgamma.o pgamma.o qgamma.o rgamma.o dbeta.o pbeta.o qbeta.o rbeta.o dunif.o punif.o qunif.o runif.o dnorm.o pnorm.o qnorm.o rnorm.o dlnorm.o plnorm.o qlnorm.o rlnorm.o df.o pf.o qf.o rf.o dnf.o dt.o pt.o qt.o rt.o dnt.o dchisq.o pchisq.o qchisq.o rchisq.o rnchisq.o dbinom.o pbinom.o qbinom.o rbinom.o rmultinom.o dcauchy.o pcauchy.o qcauchy.o rcauchy.o dexp.o pexp.o qexp.o rexp.o dgeom...
2005 Oct 13
1
About Qusi-Monte carlo program
Dear Listers; Does anybody has experience in doing simulation via Qusi-Monte carlo in R or S-plus, if so, could you like to send a small copy of your program to me, I appreciate and thanks in advance!! Frankly speaking, I am struggling to write this kind of program, while I could not figure out, painful!!!!! Best regards, Tony --------------------------------- [[alternative HTML
2006 Jan 17
2
Cumulative Density Plots (Hmisc/lattice)
I have been using the ECDF function in the Hmisc package to produce cumulative distribution function plots. The problem is that for small datasets the steps "look bad" (not my characterization but from the client). Is there a way to get the same information but smoothed? I have tried the densityplot (lattice), which gives a smoothed line, but this does not give the cumulative density.
2012 Nov 13
0
Issues running sensitivity analysis
...h 26 paramters, mostly normally distributed (with a few truncated to not go below 0). I've been trying both the fast99 and sobol2007 functions, but having problems with both: * with fast99, points seem to be generated at the minimum and maximum values a distribution can take, which is fine for qunif, but causes problems with qnorm, as it generates +-Inf values, which don't work with the model. * with sobol2007, I've done runs using 2x500 point samples, resulting in 14k runs. This gives quite wacky output, with both negative and very high values appearing in the first order and total i...
1997 Dec 13
1
R-beta: Compile error; R-0.60.1, Solaris 2.6, gcc 2.7.2.1
...../include -c rpois.c -o rpois.o gcc -g -I../include -c dt.c -o dt.o gcc -g -I../include -c pt.c -o pt.o gcc -g -I../include -c qt.c -o qt.o gcc -g -I../include -c rt.c -o rt.o gcc -g -I../include -c dunif.c -o dunif.o gcc -g -I../include -c punif.c -o punif.o gcc -g -I../include -c qunif.c -o qunif.o gcc -g -I../include -c runif.c -o runif.o gcc -g -I../include -c dweibull.c -o dweibull.o gcc -g -I../include -c pweibull.c -o pweibull.o gcc -g -I../include -c qweibull.c -o qweibull.o gcc -g -I../include -c rweibull.c -o rweibull.o ar cr ../lib/libmath.a fsquare.o fcube.o f...
2008 Jan 11
0
New version of ggplot2: 0.5.7
...type now works properly * geom_segment now uses both ends of segments to calculate axis limits * plotmatrix: fix bug in scatterplot matrix where all scatterplots were transposed! * qplot: should now work better within functions * quickplot added as an alias of qplot, to avoid confusion with qunif, etc * scale_*: better error message if you add a scale without a matching aesthetic mapping in the plot * scale_identity no longer converts everything to character * scale_identity: grob argument renamed to guide * stat_*: made all statistics more robust to errors * stat_quantile: fixed...
2008 Jan 11
0
New version of ggplot2: 0.5.7
...type now works properly * geom_segment now uses both ends of segments to calculate axis limits * plotmatrix: fix bug in scatterplot matrix where all scatterplots were transposed! * qplot: should now work better within functions * quickplot added as an alias of qplot, to avoid confusion with qunif, etc * scale_*: better error message if you add a scale without a matching aesthetic mapping in the plot * scale_identity no longer converts everything to character * scale_identity: grob argument renamed to guide * stat_*: made all statistics more robust to errors * stat_quantile: fixed...