similar to: error bars in matplot

Displaying 20 results from an estimated 3000 matches similar to: "error bars in matplot"

2013 May 01
2
Factors and Multinomial Logistic Regression
Dear All, I am trying to reproduce the example that I found online here http://bit.ly/11VG4ha However, when I run my script (pasted at the end of the email), I notice that there is a factor 2 between the values for the coefficients for the categorical variable female calculated by my script and in the online example. Any idea about where this difference comes from? Besides, how can I
2005 Apr 01
1
plotCI error when trying to omit upper or lower bars (PR#7764)
Full_Name: Volker Franz Version: 2.0.1 (2004-11-15) OS: Mac OSX / Debian Submission from: (NULL) (84.58.8.232) Hi there, the new version of plotCI (Version: 2.0.3 of gplots) produces errors if the upper or lower error bars should be omitted by passing NULL as an argument. Older versions of plotCI had no problem with this. Here is an example: library(gplots) means <- c(1,2,3,4,5) upperw
2018 May 03
4
adding overall constraint in optim()
Hi ? This is giving me a headache. I?m trying to do a relatively simple optimization ? actually trying to approximate the output from the Excel Solver function but at roughly 1000x the speed. ? The optimization parameters look like this. The only trouble is that I want to add a constraint that sum(wgt.vect)=1, and I can?t figure out how to do that in optim. Mo.vect <-
2010 Apr 21
1
Adding error bars to xyplot()
Hi, I want to add error bars to a plot generated with xyplot. I've tried both errbar() and plotCI(), but in both cases the points are not in the same place. It's as if the two functions are using a different frame of reference for the plotting area. for example: means <- c(92.5, 92.25, 90.9, 91.0, 94.15, 90.05) #means time <- c(1,1,2,2,3,3) #occasion variable group <-
2006 Sep 04
3
Subsetting vectors based on condition
Hello, I have a question regarding subsetting of vectors. Here's an example of what I'm trying to do: vect.1 <- c(76,195, 290, 380) vect.2 <- c(63, 95, 133, 170, 215, 253, 285, 299, 325, 375) I would like to subset vect.2 so that it has the same length as vect.1, and its numbers are the first corresponging higher value compared to vect.1. The output should be: final.output =
2010 Feb 12
3
Code working but too slow, any idea for how to speed it up ?(no loop in it)
Hello my friends, here is a code I wrote with no loops on matrix that is taking too long (2 seconds and I call him 720 times --> 12 minutes): mat1 and mat2 are both matrix with 103 columns and 164 rows. sequence <- matrix(seq(1 : ncol(mat1))) returns <- apply(sequence, 1, function, mat1= mat1, mat2 = mat2, day = 1) function<- function(mat1, mat2, colNb, day){
2006 Oct 16
2
set linetype with plotCI
Dear R-list, I'm iterating several calls to plotCI [gplots], like so: plotCI( x = xvals.f[sorted], y = yvals.f[sorted], xlim = c(xmin, xmax), ylim = c(ymin, ymax), pch = plot_symbols[graph_idx], type = "b", lty = plot_linetypes[1], col = plot_colors[graph_idx], barcol = plot_colors[graph_idx], uiw = NA, xlab = "", ylab = "", add =
2008 Jun 09
1
Cross-validation in R
Folks; I am having a problem with the cv.glm and would appreciate someone shedding some light here. It seems obvious but I cannot get it. I did read the manual, but I could not get more insight. This is a database containing 3363 records and I am trying a cross-validation to understand the process. When using the cv.glm, code below, I get mean of perr1 of 0.2336 and SD of 0.000139. When using a
2002 May 29
1
bug in xfig()?
I'm using (Linux version) xfig() within a function and then simple matplot() and matline() plots. Although I do not define any bg or fg default color, sometimes all lines in the final fig file are green. The same code works as (I) expected if I use x11() or pdf(). This is what I'm doing: I open 2 devs: xfig() dev.set(2) layout(mat1) xfig() dev.set(3)
2012 Dec 11
1
Rprof causing R to crash
I'm trying to use Rprof() to identify bottlenecks and speed up a particullary slow section of code which reads in a portion of a tif file and compares each of the values to values of predictors used for model fitting. I've written up an example that anyone can run. Generally temp would be a section of a tif read into a data.frame and used later for other processing. The first portion
2007 Nov 12
1
update matrix with subset of it where only row names match
I guess this has a simple solution: I have matrix 'mat1' which has row and column names, e.g.: A B C row1 0 0 0 row2 0 0 0 .... rown 0 0 0 I have a another matrix 'mat2', essentially a subset of 'mat1' where the rownames are all in 'mat1' e.g.: B row3 5 row8 6 row54 7 I want to insert the values of matrix mat2 for column B (in reality it could be some or
2018 May 06
1
adding overall constraint in optim()
Hi Michael, A few comments 1. To add the constraint sum(wgt.vect=1) you would use the method of Lagrange multipliers. What this means is that in addition to the w_i (the components of the weight variables) you would add an additional variable, call it lambda. Then you would modify your optim.fun() function to add the term lambda * (sum(wgt.vect - 1) 2. Are you sure that you have defined
2018 May 03
0
adding overall constraint in optim()
You can't -- at least as I read the docs for ?optim (but I'm pretty ignorant about this, so maybe there's a way to tweak it so you can). See here: https://cran.r-project.org/web/views/Optimization.html for other R optimization capabilities. Also, given your credentials, the r-sig-finance list might be a better place for you to post your query. Cheers, Bert Bert Gunter
2006 Feb 01
1
several plots in one
Can anyone tell me how I can supply more than one graph to plotCI (gplots) at once? Below is what I tried, also with rbind instead of cbind. What is the way to do this (in general, I think)? Problem is that lines of 1-st and 2-nd series are mixed, while they have nothing to do with each other. I also tried calling plotCI with argument add=TRUE, which didn't seem to work (that is actually
2018 May 03
2
adding overall constraint in optim()
Thanks Bert. But everyone on that forum wants to use finance tools rather than general optimization stuff! And I am not optimizing a traditional Markowitz mean-variance problem. Plus, smarter people here. :-) > On May 3, 2018, at 3:01 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > > You can't -- at least as I read the docs for ?optim (but I'm pretty > ignorant
2018 May 04
0
adding overall constraint in optim()
On Thu, May 3, 2018 at 2:03 PM, Michael Ashton <m.ashton at enduringinvestments.com> wrote: > Thanks Bert. But everyone on that forum wants to use finance tools rather than general optimization stuff! And I am not optimizing a traditional Markowitz mean-variance problem. Plus, smarter people here. :-) > I'm very confused by these statements. Most of the "finance tools"
1999 Sep 02
1
count of factors
Hello, I was used to count how many times every factor is found the following way : (assuming 'vect' is a vector of factors) tapply(vect,vect,length) but recently I experienced weird results with this In fact, my command line was tapply(ORGMORE[[1]][vect],ORGMORE[[1]][vect],length) where - 'vect' is a vector of indices - 'ORGMORE[[1]]' is a slightly long vector of
2009 Apr 20
1
Buglet in plotCI
Dieter Menne wrote: > Hi, Jim, > > there is a typo at the bottom of plotCI: there is an y.to.in which should be > x.to.in. > > See list for an example. > > http://article.gmane.org/gmane.comp.lang.r.general/147103 > > Should be: > nz <- (abs(ui - pmin(x + gap, ui)) * x.to.in) > 0.001 > > Dieter > > Hi Dieter, Thanks for the fix. I have
2010 Jan 27
1
How to sort data.frame
Dear R heleprs   Suppose I have following data   Scenarios combination_names     series1    series2 Sc1 MAT2 GAU1 7.26554 8.409778 Sc2 MAT2 GAU2 7.438128 8.130275 Sc3 MAT3 GAU1 8.058422 8.06457 Sc4 MAT1 GAU2 8.179855 8.022071 Sc5 MAT3 GAU2 8.184033 8.191831 Sc6 MAT3 GAU2 7.50312 8.232425 Sc7 MAT1 GAU2 7.603291 8.200993 Sc8 MAT1 GAU1 8.221755 8.380097 Sc9 MAT3 GAU2 7.904908
2011 Nov 16
3
plotting a double y axis when x and y lengths differ
Hello All, Many thanks to the help I have received so far. Here is an example data set I hope to plot Data1 Year Data SE 1 2005 2 0.01 2 2006 4 0.01 3 2007 5 0.01 4 2008 2 0.01 5 2009 3 0.01 6 2010 6 0.01 Data2 Year Data SE 1 2006 32 1 2 2007 100 2 3 2008 60 4 4 2009 67 3 5 2010 8 1 Notice Data2 has one less years worth of data than Data1 (which is my