Displaying 1 result from an estimated 1 matches for "uppw2".
Did you mean:
uppw1
2012 Dec 17
1
seeking a help on if function
...l)
G<-0.5
h<-0.5
w<-((exp(G*data1)-1)/G)*(exp((h*data1^2)/2))
group1<-sort(w)
g<-0.15 ## proportion of trimming
## group 1
uw<-floor(0.2*n1)
low1<-mean(group1[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-gw...