search for: ybars

Displaying 20 results from an estimated 26 matches for "ybars".

Did you mean: bars
2010 Nov 16
2
Vectors out of lists?
Hello there I have a list, Y, and each component of that list is a real-valued function (that is, Y[[i]](u) returns a number). I was wishing to build the mean function and the first thing I thought of was Ybar<-function(u){ mean(Y[[1:n]](u)) } but obviously this doesn't work, since Y[[1:n]] is not allowed at all. Any elegant suggestions? I really would like to avoid something like
2008 Jul 20
4
drawing segments through points with pch=1
Please excuse me for asking such basic questions: Here is my code > y=c(1.21,0.51,0.14,1.62,-0.8,0.72,-1.71,0.84,0.02,-0.12) > ybar=mean(y) > ll=length(y); > ybarv=rep(ybar,ll) > x=1:ll > plot(x,ybarv,pch=1) > segments(x[1],ybar,x[ll],ybar) What I get is a collection of small circles, with a segment "on top" of the circles, which is almost what I want. But I
2008 Jul 20
3
asp and ylim
#See David Williams' book "Weighing the odds", p286 y <- c(1.21, 0.51, 0.14, 1.62, -0.8, 0.72, -1.71, 0.84, 0.02, -0.12) ybar <- mean(y) ylength <- length(y) ybarv <- rep(ybar, ylength) x <- 1:ylength plot(x,y,asp=1,xlab="position",ylab="ybar",type="n",ylim=c(-1,1)) segments(x[1], ybar, x[ylength], ybar) segments(x,ybarv,x,y)
2011 Jun 03
2
Y error bars, dates on the X-axis
Dear forum, Does anyone know any functions for plotting vertical error bars, if the x-axis variable is a date? I can produce a pretty plot with dates on the x-axis, if I don't want to include error bars. I can also produce a nice plot with error bars, if I just use Julian days for the x-axis, but I'd much rather have the actual dates. I have tried writing my own function, plotCI
2008 Sep 06
2
Hopefully an easy error bar question
Hi im trying to add error bars to my barplots, there very basic, i have a few grapghs where the y variable is different but on all the X variable is Age (Adult and Juvenile) however this is split into two levels so i have males and females, so my graph basically has four bars on it. I know how to add eror bars for instance when there is only one level eg lookng at the diffrence between male and
2007 Sep 25
2
Need help with function writing
Hello: If anyone could guide me with this I would greatly appreciate it. Thanking you in advance for your assistance. Using a 3-level input factor alternative so that a function(below) can compute both a two-sided and one-sided p-values. Making the two-sided test the default. And produce output information about which alternative was tested. Where would I place the ifelse statement?
2010 Nov 18
0
On efficiency, Vectorize and loops
In my last e-mails, I have asked for help regarding 1. 'defining functions inside loops' 2. 'integrating functions / vector arithmetics' 3. 'vectors out of lists?' 4. 'numerical integration' Since some of these topics seemed to be relevant (I'm guessing by the # of replies I got), I'm posting a modified section of my code. Any thoughts on improvements would
2000 Jul 08
1
iteration scheme
Dear friends. On p 95 in 3. ed. MASS a zero-truncated Poisson distribution is analyzed. I understand the probability distribution and expected mean. The Newton iteration scheme is Lam(m+1)=Lam(m)-[Lam(m)-Ybar(1-exp(-Lam(m))]/[1-Ybar*exp(-Lam(m)], and I suppose the latter part should be f(Lam(m))/f ' (Lam(m)) and f(Lam(m)) is Lam(m)/(1-exp(-Lam(m)), right ? But then f ' (Lam(m)) is
2002 May 09
4
Rsquared in summary(lm)
Hello, I'm doing some linear regression: >lm<-lm(osas~alp,data) >summary(lm) However, the Rsquared in the output of summary() is not the same as the "standard" Rsquared calculated by spreadsheets, and outlined in statistical guidebooks, being SSR/SSTO. The output says "multiple Rsquared", but it is no multiple regression... What's the difference? Thanks,
2002 May 11
2
Bug on Mac version of lm()?
Dear Mac users, Hi, as you might have probably read the thread of "[R] Rsquared in summary(lm)" on May 10, it seems that Mac version of lm() seem to be working incorrectly. I enclose the script to produce the result both for lm() and manual calculation for a simple regression. Could you run the script and report with the version of R, so I don't have to go through every builds
2012 Jul 18
1
Regression Identity
Hi, I see a lot of folks verify the regression identity SST = SSE + SSR numerically, but I cannot seem to find a proof. I wonder if any folks on this list could guide me to a mathematical proof of this fact. Thanks. David. -- View this message in context: http://r.789695.n4.nabble.com/Regression-Identity-tp4636829.html Sent from the R help mailing list archive at Nabble.com.
2007 Sep 24
1
hypothesis testing
This was sent to me by someone on the R-list ( I don't know her ) but I don't have time to look at this right now so I told her I would send it to the R-list because she said it keeps getting bounced when she sends it. #======================================================================= ==================================================================== I am a bit confused with
2007 Nov 07
1
Homework help: t test hypothesis testing with summarized data?
Is this how a t hypothesis test is done when I don't have the actual data, but just the summarized statistics: > #Homework 9.2.6 [1] > n<-31 > xbar<-3.10 > s_x<-1.469 > m<-57 > ybar<-2.43 > s_y<-1.35 > s_pooled<- (((n-1)*s_x^2) + ((m-1)*s_y^2)) / (n + m - 2) > s_pooled [1] 1.939521 > t_obs <- (xbar - ybar) / (s_pooled * (sqrt(1/n + 1/m)))
2006 Sep 27
3
t-stat Curve
Number of subjects = 25 Mean of Sample = 77 Standard Deviation (s) = 12 sem = 2.4 df = 24 The claim is that population mean is less than 80 * > 80 So our H0 (null hupotheis) is * > 80 > qt(.95,24) [1] 1.710882 > qt(0.05, 24) [1] -1.710882 tstat = -1.25 on t24 falls between 1.711 (.95,24) and *1.711 (.005,24) How Could I sketch t curve for the above data where my * would be at the
2008 Sep 30
1
Using sub to get captions in barplots
All, I've been using "sub" (subtitle) instead of "main" such that captions are below figures produced by xyplot. This works fine and captions are on a single line. However, when I try this for bar plots with error bars (altering the error.bars function form Crawley's The R Book, see below), the captions are split on more than 1 line. Is there a way to get the
2005 Apr 21
2
local average
...r your help! Assume I have a matrix of two covariates: n <- 1000 Y <- runif(n) X <- runif(n,min=0,max=100) data <- cbind(Y,X) Now, I would like to compute the local average of Y for each X interval 0-1, 1-2, 2-3, ... 99-100. In other words, I would like to obtain 100 (local) Ybars, one for each X interval with width 1. Also, I would like to do the same but instead of local means of Y obtain local medians of Y for each X interval. Best, Jens
2012 Oct 25
2
error bars
Hello R-help, I am using R version 2.15.1. I upgraded from R version 2.13 a few months back. Previously, I was able to plot error bars on an xy scatter plot using the errbar function: errbar(RAEthylene$TIME,RAEthylene$AVE,RAEthylene$AVE+RAEthylene$STD,RAEthylene$AVE-RAEthylene$STD,add = TRUE,lty=2,pch=17); Today, I went to update my plot. However, in R version 2.15.1 I get error code
2010 Jul 18
2
loop troubles
Hi all, I appreciate the help this list has given me before. I have a question which has been perplexing me. I have been working on doing a Bayesian calculating inserting studies sequentially after using a non-informative prior to get a meta-analysis type result. I created a function using three iterations of this, my code is below. I insert prior mean and precision (I add precision manually
2007 Mar 28
2
Suggestion for memory optimization and as.double() with friends
Hi, when doing as.double() on an object that is already a double, the object seems to be copied internally, doubling the memory requirement. See example below. Same for as.character() etc. Is this intended? Example: % R --vanilla > x <- double(1e7) > gc() used (Mb) gc trigger (Mb) max used (Mb) Ncells 234019 6.3 467875 12.5 350000 9.4 Vcells 10103774 77.1
2007 Sep 03
1
how to compute cross correlation
Hello R Users, How to compute cross correlation between two time series. Data is in ASCII format. I am using R on windows. Many thanks, Regards, Yogesh [[alternative HTML version deleted]]