Displaying 20 results from an estimated 28 matches for "mean1".
Did you mean:
means
2012 Dec 17
1
seeking a help on if function
...1[1:uw])
uppw1<-mean(group1[(n1-uw+1):n1])
UWx<-uppw1-low1
vw<-floor(0.5*n1)
low2<-mean(group1[1:vw])
uppw2<-mean(group1[(n1-vw+1):n1])
LWx<-uppw2-low2
gam.low<-g*(UWx/(UWx+LWx))
gam.upp<-g-gam.low
gw1<-floor(n1*gam.low)
gw2<-floor(n1*gam.upp)
hw<-n1-gw1-gw2
trim.mean1<-1/hw*(sum(group1[(gw1+1):(n1-gw2)]))
a<-((gw1+1)*((group1[gw1+1]-trim.mean1)^2))+sum(group1[(gw1+2):(n1-gw1-1)]-trim.mean1)^2+((gw1+1)*(group1[n1-gw1]-trim.mean1)^2)
b<-(((gw1+1)*((group1[gw1+1]-trim.mean1)^2))+sum(group1[(gw1+2):(n1-gw2-1)]-trim.mean1)^2+((gw2+1)*(group1[n1-gw2]-trim.me...
2005 Jun 17
2
reading csv-data
...t I can not solve this. I think there has to be one
simple solution to this, but I just can not find it.
I have saved the data in excel (csv-format). Then I read the data in R e.g.
>data <- read.csv2("example.csv", header=TRUE)
I look the data and it looks ok. E.g
>data
Mean1
1 4.4332
2 8.5113
3 35.1624
4 9.1693
5 2.974
6 65.1578
7 43.2241
8 3.1278
9 5.3364
10 3.9767
However, this "Mean1" is categorical when it should be real numbers.
> Mean1
[1] 4.4332 8.5113 35.1624 9.1693 2.974 65.1578 43.2241 3.1278 5.3364
Levels...
2011 Aug 22
3
Multiple regression in R - unstandardised coefficients are a different sign to standardised coefficients, is this correct?
...and some of the data, is as follows (once the
database has been imported from SQL, and outliers removed).
Z1sub <- Z1[, c(2, 5, 7,11, 12, 13, 15, 16)]
colnames(Z1sub) <- c("temp", "hum", "wind", "press", "rain", "s.rad",
"mean1", "sd1" )
attach(Z1sub)
names(Z1sub)
Model1d <- lm(mean1 ~ hum*wind*rain + I(hum^2) + I(wind^2) + I(rain^2) )
summary(Model1d)
Call:
lm(formula = mean1 ~ hum * wind * rain + I(hum^2) + I(wind^2) +
I(rain^2))
Residuals:
Min 1Q Median 3Q Max
-1230....
2008 Sep 22
1
lme problems
...air) were subjected to two treatments (treatment) and were measured for 12 successive days within each treatment (layingday). Overall 5*2*12=120 observations.
I want to test the effect of treatment, time (layingday) and their interaction. I have done so through the ANOVA below:
> bmc3<-aov(Mean1~treatment*layingday+Error(male.pair/treatment/layingday))
> summary(bmc3)
Error: male.pair
Df Sum Sq Mean Sq F value Pr(>F)
Residuals 1 0.13850 0.13850
Error: male.pair:treatment
Df Sum Sq Mean Sq
treatment 1 0.60525 0.60525
Error: male.pair:treatment...
2011 Aug 16
4
a question about lm on t-test.
Hi all:
I have a question about lm on t-test.
data(sleep)
I wanna perform t-test to test the difference between the 2 groups:
I can use:
t.test(extra~group)
The t.test result shows that:t = -1.8608; mean1=0.75,mean2=2.33
But I still wanna use:
summary(lm(extra~group))
Intercept=0.75,which is mean1,just the same as t.test.
group2=1.58 means the difference of the 2 groups,so
mean2=1.58+0.75=2.33,just the same as t.test.
And some parameters of group2(t value,Pr) are the same as t.test,since
group2 i...
2010 Aug 26
2
Problems when Apply a script to a list
Dear users,
*******I have a function f to simulate data from a model (example below used
only to show my problems)
f<-function(n,mean1){
a<-matrix(rnorm(n, mean1 , sd = 1),ncol=5)
b<-matrix(runif(n),ncol=5)
data<-rbind(a,b)
out<-data
out}
*********I want to simulate 1000 datasets (here only 5) so I use
S<-list()
for (i in 1:5){
S[[i]]<-f(n=10,mean1=0)}
******I have a very complicated function for estimation o...
2010 Sep 04
2
Function try and Results of a program
Hello, users.
Dear users,
*******I have a function f to simulate data from a model (example below used
only to show my problems)
f<-function(n,mean1){
a<-matrix(rnorm(n, mean1 , sd = 1),ncol=5)
b<-matrix(runif(n),ncol=5)
data<-rbind(a,b)
out<-data
out}
*********I want to simulate 1000 datasets (here only 5) so I use
S<-list()
for (i in 1:5){
S[[i]]<-f(n=10,mean1=0)}
******I have a very complicated function for estimation o...
2010 Nov 23
1
Barplot and plot means with confidence intervals in the same plot
...s
with other scale on the left in the same plot. I need help to get the same
x axis (centered) when overlay two plots (barplot2 and plotCI (or
lineplot.CI) with errorbars), with diferent y axis. I use par (new=T) but
the X axis names are not centered with the figures.
An example of my data:
mean1<-cbind(55.5,56.42,56.38,55.28)
SD1<-cbind(10,9 ,7 ,3)
x<-rbind(mean1,SD1)
colnames(x)<-c("Autumn","Spring","Summer","Winter")
rownames(x)<-c("MeanProts","SD")
mean2<-cbind(10,15,9,8)
SD2<-cbind(2,3 ,1 ,5)
y<-...
1999 Mar 07
1
ANOVA f-test
I have a rather basic question. How can I get R to generate a ANOVA table
and a f-value for a hypothesis test such as:
Data: group1 values: 5.2 4.5 6.0 6.1 6.7 5.8
group2 values: 6.5 8.0 6.1 7.5 5.9 5.6
...
H0: mean1 = mean2 = mean3 = mean4
HA: at least two means different
where I want to evaluate using a f test statistic?
F = MSTr/MSE
I'd like a table similar to one that Minitab would produce:
Df Sum Sq Mean Sq F value
mean1
mean2
mean3
Error
Secondly, how can do a second evaluation using...
2003 Dec 04
6
get mean of several rows
...s of trying around, I gave up:
I have a 2-dimensional array, and I know how to split it into its rows
and how to get the mean for every row using 'sapply'.
But what I want is to calculate the mean over the first n rows, and then
the second n rows, etc., so that I get a vector like:
v == mean1(row 1:5), mean2(row6:10),...
(trivial, you might say. I find it rather mind-boggling, though: I tried
to get the mean from the array before splitting it, after splitting it,
looping through it with for-loops...I feel like an idiot by now; looks
like I missed a crucial point of how 'R' w...
2006 Mar 11
2
Draw level lines on the surface of a bivariate function
...awn, some parts of them are, of
course, visible
even if they are drawn on a non visible "face".
Any suggestion to avoid this problem ?
Thank you
Etienne
Example :
trans3d <- function(x,y,z, pmat)
{
tr <- cbind(x,y,z,1) %*% pmat
list(x = tr[,1]/tr[,4], y= tr[,2]/tr[,4])
}
mean1 = c(2,4)
cov1 = matrix(c(0.7, 0.2,0.2,0.7), ncol=2)
x = seq(0, 5, by = 0.1)
y = seq(0,10, by= 0.1)
z = matrix(nrow = length(x), ncol=length(y))
for(i in 1:length(x))
for(j in 1:length(y))
{
z[i,j]=dmvnorm(c(x[i],y[j]),mean1,cov1)
}
pmat1 = persp(x, y, z, col= "red",shade = 0....
2010 Aug 31
0
Export Results to a txt file applying a function to a list
Dear users,
*******I have a function f to simulate data from a model (example below used
only to show my problem)
f<-function(n,mean1){
a<-matrix(rnorm(n, mean1 , sd = 1),ncol=5)
b<-matrix(runif(n),ncol=5)
data<-rbind(a,b)
out<-data
out}
*********I want to simulate 1000 datasets (here only 5) so I use
S<-list()
for (i in 1:5){
S[[i]]<-f(n=10,mean1=0)}
******I have a very complicated function for estimation o...
2010 Oct 20
1
Generate variable with Bivariate Normal Distribution
Dear All
I want to generate variable with Bivariate Normal Distribution by
use mean1 = a, variance1 = b, mean2 = c, variance2 = d, rho = e.
How I can do this.
Many Thanks.
IRD
[[alternative HTML version deleted]]
2009 Jan 27
1
Problem with RMA using limma, oligo and pdInfoBuilder packages
...index1 <- 1:5
> index2 <- 6:10
> d <- rowMeans(e[, index1]) - rowMeans(e[, index2])
> design <- model.matrix(~factor(eset$Key))
> fit <- lmFit(eset, design)
> ebayes <- eBayes(fit)
> sample <- row.names(ebayes)
> Pvalue <- ebayes$p.value[,2]
> Mean1 <- rowMeans(e[,index1])
> Mean2 <- rowMeans(e[,index2])
> sd1 <- apply(e[,index1], 1, "sd")
> sd2 <- apply(e[,index2], 1, "sd")
> csv <- read.csv(file="D:/Anne-Marie/Doctorat/puces ADN macrophages/puces
rat/Annie
Dube/Analyse/RaGene-1_0-st-v...
2011 Sep 15
1
How to compute the power of a wilcoxon test?
...en to whether
my case is suitable for a wilcoxon test. After research about the
appropriateness, I am pretty sure that a wilcoxon test is the right tool for
my case. But how to compute the power of the test is still an unanswered
question bothering me.
The basic stats of my two paired samples are:
mean1 = 0.0032, sd1 = 0.012
mean2 = 0.00042, sd2 = 0.0016
sample size = 366
Could anyone help? Thank you in advance.
--
View this message in context: http://r.789695.n4.nabble.com/How-to-compute-the-power-of-a-wilcoxon-test-tp3815616p3815616.html
Sent from the R help mailing list archive at Nabble.co...
2002 Jan 04
0
R CMD check, file permissions (PR#1239)
..../R/numberof.r
* ./R/poisgam.r
* ./R/progress.meter.r
* ./R/qnorm.appr.r
* ./R/qres.r
* ./R/rowSums.r
* ./R/S.princomp.r
* ./R/select.range.r
* ./R/shapiro.wilk.test.r
* ./R/smoothed.df.r
* ./R/tri.r
* ./R/tweedie.r
* ./R/tweedief.r
* ./R/weighted.mean1.r
* ./R/zzz.R
* ./R/weighted.median.r
* ./R/plotCI.Rd
* ./man/cbind.dimnames.Rd
* ./man/chlib-internal.Rd
* ./man/clean.na.Rd
* ./man/eql.Rd
* ./man/invgauss.Rd
* ./man/my.table.Rd
* ./man/negbingof.Rd
* ./man/numberof.Rd
* ./man/poisgam.Rd
* ./ma...
2010 Aug 18
2
functions and multiple levels
Hi,
I am trying to write a function;
I want to subtract the mean of each class in level 2 from the mean of each
class in level 1 and square the answer, eg.....
level.1 level.2 observation
1 1 0.5
1 1 0.2
1 2 0.6
1 2 0.4
2 3
2002 Mar 01
3
Power of t-test in R vs. S-PLUS
...0.5488882
sd = 0.2
sig.level = 0.01
power = 0.8
alternative = two.sided
NOTE: n is number in *each* group
S-PLUS 2000 Professional Release 2:
> normal.sample.size(n1=5, n2=5, mean=0, sd1=0.2, sd2=0.2, power=0.8,
alpha=0.01, alternative="two.sided")
mean1 sd1 mean2 sd2 delta alpha power n1 n2 prop.n2
1 0 0.2 0.4322771 0.2 0.4322771 0.01 0.8 5 5 1
------------------------------------------
Dr. J?rn Quedenau
Coordinator Data Management Bioinformatics
Metanomics GmbH & Co. KGaA
Tegeler Weg 33, D-10589 Berlin, Germany
Tel +49...
2006 Jun 13
2
automated data processing
I have many files (0.4.dat, 0.5.dat, ...) of which I would like to calculate mean value and variance and save the output in a new file where each line shouldlook like: "0.4 mean(0.4.dat) var(0.4.dat)" and so on. Right now I got a a simple script that makes me unhappy:
1. I run it by "R --no-save < script.r > out.dat" unfortunately out.dat has all the original commands in
2017 Aug 24
1
Problem in optimization of Gaussian Mixture model
Hello,
I am facing a problem with optimization in R from 2-3 weeks.
I have some Gaussian mixtures parameters and I want to find the maximum in
that
*Parameters are in the form *
mean1 mean2 mean3 sigma1 sigma2 sigma3 c1 c2 c3
506.8644 672.8448 829.902 61.02859 9.149168 74.84682 0.1241933
0.6329082 0.2428986
I have used optima and optimx to find the maxima, but it gives me value
near by the highest mean as an output, for example 830 in the above...