similar to: calculate quantiles of a custom function

Displaying 20 results from an estimated 1000 matches similar to: "calculate quantiles of a custom function"

2012 Nov 02
2
Merge data frame with mispelling characters
Hello dear R-helpers, I'm working with R-2.15.2 on Windows 7 OS. I'm stucked with a merge of two data frames by characters. In each data frame I got two different list of names, that is my main-key to be merged. To figure out what I'm saying, I build up a modified "?merge" example, with errors by purpose: # Data for authors: authors <- data.frame( surname =
2011 Dec 28
2
Gale-Shapley Algorithm for R
Dear R-helpers, I'm not a speciallist in writing complex functions, and the function still very rusty (any kind of suggestions are very welcome). I want to implement Gale-Shapley algorithm for R Language. It is based on http://www.jstor.org/stable/10.2307/2312726 Gale and Shapley (1962) , and it has evolved to
2011 Jul 11
1
problem finding p-value for entropy in reldist package
Hi, I am using the reldist package and having problems determining the p-value for the entropy value from the reldist function. I am able to properly determine the entropy value, but cannot figure out what function to use to find the p-value. I have tried using rpy, rpluy (which provides p-values for the polarization values) and investing the results from reldist(). Thus, far I cannot find the
2011 Dec 28
2
Contingency tables example
I have this question: http://r.789695.n4.nabble.com/file/n4240145/data%5D.jpg This table and data represents a sample of social housing residents in Copenhagen and I'm asked to analyse the data with a view to seeing what might be related to residents satisfaction levels. And I just don't know where to start, if anyone could help this would be greatly appreciated Regards Sam --
2012 Feb 28
1
Error in solve.default(res$hessian * n.used) :Lapack routine dgesv: system is exactly singular
Hi there! I´m a noob when it comes to R and I´m using it to run statisc analysis. With the code for ARIMA below I´m getting this error: Error in solve.default(res$hessian * n.used) :Lapack routine dgesv: system is exactly singular The code is: > s.ts <- ts(x[,7], start = 2004, fre=12) > get.best.arima <- function (x.ts, maxord=c(1,1,1,1,1,1)) + { + best.aic <- 1e8 + n <-
2011 Jul 08
4
How to label specific points on a scatterplot
Command I am using for the plot: plot(Raw[][Plate==101]~well[][Plate==101], xlab="Well", ylab="Raw", main="Plate 101") I only want to label points on the graph where well equals B13, G13, K14 and N14 with the name of the well. Thank you for your help. -- View this message in context:
2011 Jul 08
1
Getting wrong NA values using "for" cmd
Hi There, I'm facing one problem to construct a vector using the "for" command: I have one matrix named 'dados' (same as /data/ from portuguese), for example: > dados[140:150,] [,1] [,2] [,3] [1,] 212.7298 0.14 0.11 [2,] 213.3778 0.14 0.11 [3,] 214.0257 0.15 0.11 [4,] 214.6737 0.15 0.12 [5,] 215.3217 0.15 0.12 [6,] 215.9696 0.15 0.12 [7,] 216.6176 0.16
2007 Oct 26
3
How to plot multiple variables on the same graph
How to plot multiple variables on the same graph Dear R users, I want to plot the following variables (a, b, c) on the same graph. The x-axis must be the variable mat and the graph must have the type = "l". How can I do that?? > a [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 > b [1] 0.90665296 0.82473871 0.75269217 0.68917606 0.63304639 0.58332339 [7]
2008 Jun 12
4
How to increase the for() loop speed?
Dear R users, I would like to know if there is a way to increase the for() loop speed because in my routine the calculations are too slow. Best regards. Rafael Barros de Rezende Cedeplar - Center for Development and Regional Planning Face, UFMG ([1]http://www.cedeplar.ufmg.br) -- Esta mensagem foi verificada pelo sistema de antiv??rus e acredita-se estar livre de
2010 Nov 07
3
Computing ergodic mean with CODA
Hi all, I would like to compute ergodic mean using MCMC output from WinBUGS. I tried using CODA package, but it seems that it is not implemented yet. Could anyone help me to compute this? Attached to this email are my output and index files. Kind regards, Raquel -- Raquel Rangel de Meireles Guimar?es Doutoranda em Demografia raquel at cedeplar.ufmg.br
2004 Nov 01
5
make apply() return a list
Hi, I have a dataframe (say myData) and want to get a list (say myList) that contains a matrix for each row of the dataframe myData. These matrices are calculated based on the corresponding row of myData. Using a for()-loop to do this is very slow. Thus, I tried to use apply(). However, afaik apply() does only return a list if the matrices have different dimensions, while my matrices have
2011 Dec 01
3
Change the limits of a plot "a posteriori"
Hi all How can I change the limits (xlim or ylim) in a plot that has been already created? For example, consider this naive example curve(dbeta(x,2,4)) curve(dbeta(x,8,13),add=T,col=2) When adding the second curve, it goes off the original limits computed by R for the first graph, which are roughly, c(0,2.1) I know two obvious solutions for this, which are: 1) passing a sufficiently large
2001 Jun 06
3
error in dbeta (PR#970)
Full_Name: Hans Peter Wolf Version: 1.2.1 OS: hpux10.20 Submission from: (NULL) (129.70.84.25) dbeta computes a wrong result with parameters (1.3,1) > version platform hppa2.0-hp-hpux10.20 arch hppa2.0 os hpux10.20 system hppa2.0, hpux10.20 status major 1 minor 2.1 year
2011 Aug 01
3
Beta fit returns NaNs
Hi, sorry for repeating the question but this is kind of important to me and i don't know whom should i ask. So as noted before when I do a parameter fit to the beta distr i get: fitdist(vectNorm,"beta"); Fitting of the distribution ' beta ' by maximum likelihood Parameters: estimate Std. Error shape1 2.148779 0.1458042 shape2 810.067515 61.8608126 Warning
2010 Jan 04
3
how to plot multiple density functions in one graph
Hello, I am new to R and have two easy questions. How can you plot multiple density functions in one graph? I have five beta densities that I would like to plot in one graph. I understand how to plot one beta density as a line: plot (x,(dbeta(x,shape1=,shape2=,), type ="l") Does the Pareto distribution need to be added to R with an additional package? thanks, John [[alternative
2013 Sep 18
1
dbeta may hang R session for very large values of the shape parameters
Dear all, we received a bug report for betareg, that in some cases the optim call in betareg.fit would hang the R session and the command cannot be interrupted by Ctrl-C? We narrowed down the problem to the dbeta function which is used for the log likelihood evaluation in betareg.fit. Particularly, the following command hangs the R session to a 100% CPU usage in all systems we tried it (OS X
2007 Nov 24
2
how to compute highest density interval?
Suppose i want to compute a 95% highest density for a beta distribution beta(a,b) the two end points x1 and x2 shoudl satisfy the following two equations: pbeta(x1,a,b)-pbeta(x2,a,b)=95% dbeta(x1,a,b)=dbeta(x2,a,b) Is there any fast way to compute x1 and x2 in R? [[alternative HTML version deleted]]
2008 Sep 30
2
R's integrate function
Hello, I am trying to use R's integrate function to calculate the following integral for z=423: integrate(function(y,z){ sapply(y, function(y,z){ integrate(function(x,z) 1/x*dbeta(0.01,x/(0.005/1.005),(1-x)/(0.005/1.005))*dbeta(y,x/(0.005/1.005),(1-x)/(0.005/1.005))*(1-y)^z,0,1,423)$value }) },0,1,423)$value but I receive an error message saying that the maximum number of subdivisions is
2007 Oct 24
1
Error in nls model.frame
Error in model.frame When I run the following nls model an error message appears and I dont know how to solve that. Could you help me?? mat = c(1,2,3,4,5,6,7,8,9,12,16,24,36,48,60) for (i in 1:length(j30)) { bliss = nls(c(j[i,1:length(mat)]) ~ b0 + b1*((1-exp(-k1*mat))/(k1*mat)) + b2*(((1-exp(-k2*mat))/(k2*mat))-exp(-k2*mat)), start = list(k1=0.1993, k2=0.1993, b0= 22.0046,
2004 Nov 09
3
Strange results for Beta Distribution
Dear All, I got these results from the example in the function "dbeta": >x <- seq(0, 1, length=21) > dbeta(x, 1, 1) [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Any Idea? TIA Giovanni dr. Giovanni Parrinello Section of Medical Statistics Department of Biosciences University of Brescia 25127 Viale Europa, 11 Brescia Italy Tel: +390303717528 Fax: +390303701157