Displaying 20 results from an estimated 95 matches for "xbar".
Did you mean:
bar
2003 Jul 22
4
greek in main title
...Is this possible? I can get nontext for the xlab
and ylab pretty easily.
Thanks, Jason
Below is my code. Currently it just writes out "theta."
function (theta)
{
layout(matrix(c(1:4),2,2,byrow=TRUE))
par(bg = "cornsilk")
n <- c(1,10,25,50)
for(i in 1:4) {
xbar <- rep(0, 1000)
for (j in 1:1000)
xbar[j] <- mean(rexp(n[i], rate = 1/theta))
heading <- paste("Exp w/ theta =", theta, ", n = ", n[i])
hist(xbar, prob = TRUE, breaks = "FD", main = title(heading, font.main = 6),
col = "l...
2007 Jan 26
1
plotting results from tapply
...some example code:
y1<-rnorm(40, 2)
x1<-rep(1:2, each=20)
x2<-rep(1:2, each=10 times=2)
ex.dat<-data.frame(cbind(y1,x1,x2))
ex.dat$x1<-factor(ex.dat$x1, labels=c("A", "B"))
ex.dat$x2<-factor(ex.dat$x2, labels=c("C", "D"))
attach(ex.dat)
xbar<-tapply(ex.dat$y1, ex.dat[,-1], mean)
xbar
#values I'd like to plot:
row.names(xbar) #levels of x1
xbar[,1] #mean response of y1 for group C (x2) across x1
#plot mean response y1 for group C against x1 (i.e., using x2 as a grouping
factor).
plot(row.names(xbar), xbar[,1], ylim=range[y1])...
2007 Jul 25
3
Constructing bar charts with standard error bars
...a "Traditional Bar Chart with Standard
Error Bar", like the kind shown here:
http://samiam.colorado.edu/~mcclella/ftep/twoGroups/twoGroupGraphs.html
Is there a simple way to do this?
So far, I have only figured out how to plot the bars using barplot.
testdata <- scan(, list(group=0,xbar=0,se=0))
400 0.36038 0.02154
200 0.35927 0.02167
100 0.35925 0.02341
50 0.35712 0.01968
25 0.35396 0.01931
barplot(testdata$xbar, names.arg=as.character(testdata$group), main="a=4.0",
xlab="Group", ylab="xbar")
xvalues <- c(0.7, 1.9, 3.1, 4.3, 5.5)
arrows(xvalues,...
2017 Jul 08
2
CRAN I-MR / Xbar-R / Xbar-S control chart package ?
Hi,
I've had a quick look through the package list, and unless I've missed
something, I can't seem to find anything that will do I-MR / Xbar-R /
Xbar-S control charts ?
Assuming there is something out there, can anyone point me in the
right direction ?
Thanks !
TIm
2017 Jul 08
0
CRAN I-MR / Xbar-R / Xbar-S control chart package ?
...package
qcc. Maybe it's what you're looking for.
Hope this helps,
Rui Barradas
Em 08-07-2017 09:07, Tim Smith escreveu:
> Hi,
>
> I've had a quick look through the package list, and unless I've missed
> something, I can't seem to find anything that will do I-MR / Xbar-R /
> Xbar-S control charts ?
>
> Assuming there is something out there, can anyone point me in the
> right direction ?
>
> Thanks !
>
> TIm
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>...
2008 Oct 05
1
Sample mean in R
I am having issues with the following:
(muhat = 1/n^2(sum of all the xi's) )
essentially if xbar = the sample mean, muhat = sample mean but square the n.
Question:
Use R to run a Monte Carlo simulation which compares the finite-sample
performance of xbar and muhat. Specifically generate 1000 samples n=30 from
a standard normal distribution. For each sample calculate xbar and muhat. I
have n...
2011 Mar 03
3
Probabilities greather than 1 in HIST
Dear all,
I am a newbie in R and could not find help on this problem. I am trying to
plot an histogram with probabilities in the y axis. This is the code I am
using:
#TLC uniform
n=30
mi=1; mx=6
nrep=1000
xbar=rep(0,nrep)
for (i in 1:nrep) {xbar[i]=mean(runif(n,min=mi,max=mx))}
hist(xbar,prob=TRUE,breaks="Sturges",xlim=c(1,6),main=paste("n =",n),
xlab="Média", ylab="Probabilidade")
curve(dnorm(x,mean=mean(xbar),sd=sd(xbar)),add=TRUE,lwd=2,col="red")
The...
2006 Nov 05
3
struggling to plot subgroups
Hi Folks,
I have data that looks like this:
freq gender xBar
1000 m 2.32
1000 f 3.22
2000 m 4.32
2000 f 4.53
3000 m 3.21
3000 f 3.44
4000 m 4.11
4000 f 3.99
I want to plot two lines (with symbols) for the two groups "m" and
"f". I have tried the following:
plot(xBar[gender=="m"]~freq[gender=="f"]) f...
2013 Feb 08
2
qcc package
Greets,
My data looks like:
> p3.18
s xbar subgroup
1 0.84 12.2 1
2 1.64 11.2 2
3 2.07 10.6 3
4 2.49 12.2 4
5 0.84 11.2 5
...
Using the command
> qcc(p3.18$xbar,type="xbar",sizes=5,center=mean(p3.18$xbar),std.dev=mean(p3.18$s)/0.94,title="X-bar Chart for Paper Sheet Length Data&quo...
2001 Jun 21
2
timeseries: R/S (rescaled range) analysis
Has anyone written utilities to do rescaled range analysis in R?
Jeff
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 stat.math.ethz.ch
2008 Sep 02
2
qcc help
Hi Gents,
I need to get the control limits from qcc function.
As follows:
qcc(MDI, type = "xbar.one")
Call:
qcc(data = MDI, type = "xbar.one")
xbar.one chart for MDI
Summary of group statistics:
Min. 1st Qu. Median Mean 3rd Qu. Max.
0.3266 0.4249 0.4371 0.4333 0.4451 0.4858
Group sample size: 1
Number of groups: 383
Center of group stat...
2007 Dec 30
1
Histogram with different colors for different portions
...below. Has anyone
implemented something like this in general? If not, any suggestions/pointers
on how to write a general function to do so would be most appreciated.
Alan-
################################################################################
set.seed(13)
nnum <- rnorm(1000, 100, 10)
xbar <- mean(nnum)
SD <- sd(nnum)
BR <- seq(xbar - 4*SD, xbar + 4*SD, by = .25*SD)
# Histogram showing xbar +- sd in different colors
hist(nnum, breaks=BR, col=c(rep("red", 8), rep("blue", 4),
rep("pink", 8), rep("blue", 4), rep("red", 8)))...
2010 Mar 12
2
Return one value, print another
Dear R users,
I am stuck trying to figure out how to make a function return one
value and print another.? Here is an example function:
##################
eg <- function(x, digits=4) {
xbar <- mean(x)
sdx <- sd(x)
value <- list(xbar, sdx)
names(value) <- c("Mean of X", "SD of X")
return(value)}
##################
My current "solution" has been to round the variables before putting
them into the list.? Since it can go up to 22 digits, this is...
2005 Sep 07
2
Hotelling Test
Hello R-users,
I've been looking for a function performing one and two sample Hotelling
test for testing equality of mean vectors. Has anyone implemented such a
function in R?
thanks a lot,
Bill
==============
Bill Donner
Statistician
2014 Sep 08
3
problema con los cambios de marcas temporales en el eje X
...sv("Libro1.csv", header=T, sep=";", dec=",")
library(lubridate)
datIn$mes <- month(dmy(datIn$fecha), label=T, abbr=T)
datIn$anio <- year(dmy(datIn$fecha))
xlabels <- paste(datIn$mes,"-",datIn$anio,sep="")
par(oma=c(4,2,1,1))
plot(datIn$xbar, axes=F, type="b", pch=19, ylim=c(400,650), xlab="", ylab="xbar")
axis(1,at=1:length(datIn$xbar), labels=xlabels,cex.lab=0.5, las=2)
axis(2)
box()
datIn$xorig <- 1:dim(datIn)[1]
arrows(
x0=datIn$xorig, y0=datIn$lci
,x1=datIn$xorig, y1=datIn$lcs...
2010 May 05
4
P values
How do u calculated p values for a z test..
so far i ve done this
A = read.table("cw3_data.txt")
xbar = mean(A)
s = 1
n = 20
mu = 0
z.test = (xbar-mu)/(s/sqrt(n))
p.value = pnorm(abs(z.test))
error = qnorm(0.99)*s/sqrt(n)
left = xbar - error
right = xbar + error
and have got values off of it...but the values for p dont match up with
other sites that i have used to check it agaisnt..such as wolf...
2007 Apr 28
1
pacf
Hi,
I wanted to understand exactly how acf and pacf works, so I tried to
calculate ac and pac manually. For ac, I used the standard acf formula:
acf(k) = sum(X(t)-Xbar)(X(t-k)-Xbar))/sum(X(t)-Xbar)^2. But for pac, I could
not figure out how to calculate it by hand. I understand that in both R and
EVIEWS, it is done using the Durbin-Levinson algorithm by the computer.
However, I don't understand exactly how the algorithm works just by looking
at the algorithm....
2009 Feb 13
0
The effect of MLE and MME to probability of rejection
Hi I am beginner with R
I would like to compare the performance of Maximum likelihood Estimator
(MLE) and Method of Moment Estimator (MME) effect probability of rejection,
p. My MLE is
x=rlnorm(10,meanlog = 2, sdlog =5)
x
xbar=mean(x)
ssqrt=var(x)
xbar
ssqrt
#MLE
y=log(x)
m1=mean(y)
s1=var(y)
m1
s1
#MME
m2=log(xbar^2/sqrt(ssqrt+xbar^2))
s2 = log((ssqrt+xbar^2)/xbar^2)
m2
s2
If I want to use "qlnorm(..)" , where can I plug the above estimators into
this function.
Regards
Wa...
2014 Sep 08
2
problema con los cambios de marcas temporales en el eje X
Muchas gracias Carlos, previo a mi correo, entre las pruebas que hice estaba una parecida a la que apuntas de la siguiente manera:
attach (Libro1)
plot (xbar~as.Date(fechas,"%d/%m/%y"), ylim=c(400,660), xaxt="n", type="b", pch=19,cex=1)
xlabels<-strptime(fecha,format="%d/%m/%Y")
axis.Date (1,at=xlabels,format="%b-%y")
arrows(x0=as.Date(fechas,"%d/%m/%y"),y0=lci, x1=as.Date(fechas...
2009 Jul 28
2
formatting in r
...ver several lines such as seen here?
2] Critical Z etc. were added by hand. I need an example of how I can
mix alphanumeric
and numeric data on output.
Can you assist? R is proving to be a really fine computational language
that is easy to use.
Thank you.
Sincerely,
Mary A. Marion
u xbar alpha zcrit zcrit2 zstat pvalue
140 150 .05 1.6449 1.96 4 6.334248e-05
LB95 UB95 LB90 UB90
145.1 154.9 145.888 154.112
Beta Power
0.021 0.979
Critical Z = 1.645
Zstatistic = 4
Empirical Mean 150 [ 135.1, 144.9 ) = Ao(?o)
Pop...