Displaying 5 results from an estimated 5 matches for "trim2".
Did you mean:
trim
2012 May 29
1
need help to find type I error rate for modified F statistic
...lem is:
i) the value of F-test obtain from my simulation below is in negative
value..There might be something wrong in my coding
ii) after obtain F value, how i can proceed to obtain type I error rate?
h=0
g=0
n=15
alpha=0.1
k=floor(alpha*n)+1
r=k-(alpha*n)
i=k+1
m=n-k
J=2
trim1<-rep(NA,asim)
trim2<-rep(NA,asim)
pw<-rep(NA,asim)
qw<-rep(NA,asim)
px<-rep(NA,asim)
qx<-rep(NA,asim)
ssd1<-rep(NA,asim)
ssd2<-rep(NA,asim)
madN1<-rep(NA,asim)
madN2<-rep(NA,asim)
lo.w<-rep(NA,asim)
up.w<-rep(NA,asim)
lo.x<-rep(NA,asim)
up.x<-rep(NA,asim)
hw<-rep(NA,asim)
hx&l...
2012 Aug 03
2
Recursive function calls
My apologies, I know that this is not a new problem, but I'm not sure how
to find the answer
I want to recursively loop over an object and trim trailing white space.
When I use this function on a list of data.frame I get output like this:
[1] "c(\" many spaces \", \" many spaces \")" "c(\" many spaces
\", \" many spaces
2012 Jun 14
0
fixed trimmed mean for j-group
...loor(alpha*n2)+1
k3=floor(alpha*n3)+1
k4=floor(alpha*n4)+1
r1=k1-(alpha*n1)
r2=k2-(alpha*n2)
r3=k3-(alpha*n3)
r4=k4-(alpha*n4)
## j-group trimmed mean
e1=k1+1
f1=n1-k1
e2=k2+1
f2=n2-k2
e3=k3+1
f3=n3-k3
e4=k4+1
f4=n4-k4
trim1=1/((1-2*alpha)*n1)*(sum(mat1[e1:f1]) + r1*(mat1[k1]+mat1[n1-k1+1]))
trim2=1/((1-2*alpha)*n2)*(sum(mat2[e2:f2]) + r2*(mat2[k2]+mat2[n2-k2+1]))
trim3=1/((1-2*alpha)*n3)*(sum(mat3[e3:f3]) + r3*(mat3[k3]+mat3[n3-k3+1]))
trim4=1/((1-2*alpha)*n4)*(sum(mat4[e4:f4]) + r4*(mat4[k4]+mat4[n4-k4+1]))
## sample winsorized mean
x1=(1-r1)*mat1[k1+1]+r1*mat1[k1]
x2=(1-r2)*mat2[k2+1]+r2...
2012 Jul 07
0
fixed trimmed mean for group
...e1=k1+1
> f1=n1-k1
>
> e2=k2+1
> f2=n2-k2
>
> e3=k3+1
> f3=n3-k3
>
> e4=k4+1
> f4=n4-k4
>
> trim1=1/((1-2*alpha)*n1)*(sum(__mat1[e1:f1]) +
> r1*(mat1[k1]+mat1[n1-k1+1]))
> trim2=1/((1-2*alpha)*n2)*(sum(__mat2[e2:f2]) +
> r2*(mat2[k2]+mat2[n2-k2+1]))
> trim3=1/((1-2*alpha)*n3)*(sum(__mat3[e3:f3]) +
> r3*(mat3[k3]+mat3[n3-k3+1]))
> trim4=1/((1-2*alpha)*n4)*(sum(__mat4[e4:f4]) +
> r4*(mat4[k4]+mat4[n4-k4+1]))
>
>...
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame.
For instance
> ddTable <-
data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry"))
I want a dataset that is
Id Name
1 Paul
2 Bob
> unique(ddTable)
Will give me all 4 rows, and
> unique(ddTable$Id)
Will give me c(1,2), but not accompanied by the name column.