[R] SIGN.test

2013-01-02 Thread solafah bh
Hello 
I used SIGN.test function in R 2.12.2 to apply one sample sign test and it is 
worked well ,but I want to put statistic in a variable and I could not get this 
value,
I used :
x=rnorm(100)
t=SIGN.test(x,md=0,alt=less)
t$rval[1]$statistic
 
the last command work in the old version of R but it does not work in R 2.12.2. 
what can I do to get value of statistic??
 
Regards
Sulafah
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] sample

2012-10-06 Thread solafah bh
Hello
If I have x=c(3,2,6,1) and n=length(x), are the following codes equivalent??
sample(x,1,replace=TRUE)    and   sample(x,1,replace=TRUE,prob=rep(1/n , n) 
)
Regards
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] sample with equal probabilities

2012-10-06 Thread solafah bh
Hello
If I have this vector x=c(5,1,2,9) and n=length(x) and I want to sample one 
value from x , and each value of x has equal probability to appear (1/n).
Are the following codes equivalent??
sample(x,1,replace=TRUE)  and   sample(x,1,replace=TRUE,prob=rep(1/n , n))
 
Regards
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] approximation of test

2012-06-30 Thread solafah bh
Hello
I want to use this function in R (wilcox.test) , is this function can 
approximate the statistic automatically  if the sample size is large or not??
 
Regards
Sulafah
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] loop in list

2012-06-30 Thread solafah bh
Hello
I have a loop to sample 20 samples and I want to put them in one list, how I 
can make this?? 
 
Regards
Sulafah
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] out put of loop in list

2012-06-18 Thread solafah bh
Hello
I have a loop to draw few samples and I want to but this samples in one list, 
how I can make this? when I use it , the list show just the last sample. I want 
to know the correct way to put all samples in one list.
 
Regards
Sulafah
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] resample from tail of exponential

2010-11-21 Thread solafah bh
Hello
If i want to resample from the tail of exponential distribution,and the 
observations are divided to intervals ,the probability of each interval is 
p.what is the suitable command?
Regards
 
Sulafah


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] sampling from normal

2010-10-19 Thread solafah bh
Hello
If i want to resample from the lower tail of normal distribution , are these 
commands equivelant??
 lower tail :qnorm(runif(n,0,pnorm(a))) if a is a lower tail bound
or
 lower tail:qnorm(p*runif(n)) if p is the probability of each interval(the 
observations are divided to intervals)
 
Regards


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] compare histograms

2010-10-11 Thread solafah bh
Hello 
How to compare  two statistical histograms? How i can know if these histograms 
are equivalent or not??
 
Regards


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] sampling from normal distribution

2010-10-03 Thread solafah bh
Hello
If i want to resampl from the tails of normal distribution , are these commans 
equivelant??
  upper tail:qnorm(runif(n,pnorm(b),1))  if b is an upper tail boundary
  or
  upper tail:qnorm((1-p)+p(runif(n))  if p is the probability of each interval 
(the observatins are divided to intervals)
 
Regards


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] question

2010-08-20 Thread solafah bh
Hello
 
I want to know how can i sampling from upper and lower tail of normal 
distribution , in two cases , if i know the upper and lower bounds of 
distribution and if i do not.
 
Regards


  
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.