similar to: question

Displaying 20 results from an estimated 70000 matches similar to: "question"

2010 Oct 03
2
sampling from normal distribution
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]]
2012 Jun 30
3
loop in list
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]]
2012 Oct 06
2
sample
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]]
2012 Jun 18
2
out put of loop in list
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]]
2012 Oct 06
1
sample with equal probabilities
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]]
2013 Jan 02
2
SIGN.test
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
2010 Apr 19
2
Truncated Normal Distribution and Truncated Pareto distribution
Dear R helpers, I have a bimodal dataset dealing with loss amounts. I have divided this dataset into two with the bounds for the first dataset i.e. dataset-A being 5,000$ to 100,000$ and the dataset-B deals with the losses exceeding 100,000$ i.e. dataset-B is left truncated. I need to fit truncated normal disribution to dataset - I having lower bound of 5000 and upper bound of 100,000. While I
2006 Aug 16
3
fitting truncated normal distribution
Hello, I am a new user of R and found the function dtnorm() in the package msm. My problem now is, that it is not possible for me to get the mean and sd out of a sample when I want a left-truncated normal distribution starting at "0". fitdistr(x,dtnorm, start=list(mean=0, sd=1)) returns the error message "Fehler in "[<-"(`*tmp*`, x >= lower & x <= upper,
2002 Aug 06
3
hard to believe speed difference
First, I love R and am grateful to be using this free and extremely high quality software. Recently I have been comparing two algorithms and naturally I programmed in R first. It is so slow that I can almost feel its pain. So I decided to do a comparison with Java. To draw 500,0000 truncated normal, Java program takes 2 second and R takes 72 seconds. Not a computer science major, I find it hard
2017 Aug 05
2
Nested for loop
Hi! Thanks for taking the time to read this. The code below creates a graph that takes 100 samples that are between 5% and 15% of the population (400). What I'd like to do, however, is add two other sections to the graph. It would look something like this: from 1-100 samples take 100 samples that are between 5% and 15% of the population (400). From 101-200 take 100 samples that are between
2008 Jul 23
2
truncated normal
Hi, I want to generate random samples from truncated normal say Normal(0,1)Indicator((0,1),(2,4)). It has more than one intervals. In the library msm, it seems to me that the 'lower' and 'upper' arguments can only be a number. I tried rtnorm(1,mean=0,sd=1, lower=c(0,2),upper=c(1,4)) and it didn't work. Can you tell me how I can do truncated normal at more than one intervals?
2017 Aug 06
0
Nested for loop
Hi Kirsten, I can run your example code but I can't quite follow your division of sampling. Can you restate the the task? Below is what I think you are asking for, but I have the feeling I may be off the mark. Set A: 400 samples, draw 100 in range of 5 to 15 Set B: 800 samples, draw 100 in range of 5 to 15 Set C: 300 samples, draw 100 in range of 5 to 15 Ben > On Aug 5, 2017, at
2010 Oct 11
2
compare histograms
Hello How to compare  two statistical histograms? How i can know if these histograms are equivalent or not??   Regards [[alternative HTML version deleted]]
2017 Aug 06
1
Nested for loop
Hi Ben, That's exactly right! Except for each set it's the sample population that is 400, 800 or 300. I want to take 3 samples, each of 100, where only the population differs. I can do this separately, but I'm having trouble putting them all on the same graph. I'd like to have sample on the x axis (1-300) and estimate on the y axis. I want to show how population affects the
2009 Dec 11
3
how can generate from trunceted gamma distribution in R ?
Hi, all How can generate a sample from truncated inverse gamma distribution in R? thanks
2013 Mar 11
1
Implementation of the PL2 weighting scheme of the DFR Framework
Hello guys.I am working on implementing the PL2 weighting scheme of the DFR framework by Gianni Amati. It uses the Poisson approximation of the Binomial as the probabilistic model (P), the Laplace law of succession to calculate the after effect of sampling or the risk gain (L) and within document frequency normalization H2(2) (as proposed by Amati in his PHD thesis). The formula for w(t,d) in
2010 Jun 23
2
question about a program
Dear all, I have the following program for a multiple comparison procedure. There are two functions for the two steps. First step is to calculate the critical values, while the second step is the actual procedure [see below: program with two functions]. This work fine. However, However I want to put them into one function for the convenience of later use [see below: program with one
2010 Jun 18
1
question in R
Dear all, I am trying to calculate certain critical values from bivariate normal distribution (please see the function below). m <- 10 rho <- 0.1 k <- 2 alpha <- 0.05 ## calculate critical constants cc_z <- numeric(m) var <- matrix(c(1,rho,rho,1), nrow=2, ncol=2, byrow=T) for (i in 1:m){ if (i <= k) {cc_z[i] <- qmvnorm((k*(k-1))/(m*(m-1))*alpha,
2012 Apr 24
2
Some Help Needed
Dear all, I need to do some calculation where the code used are below. I get error message when I choose k to be large, say greater than 25. The error message is "Error in integrate(temp, lower = 0, upper = 1, k, x, rho, m) : the integral is probably divergent". Can anyone give some help on resolving this. Thanks. Hannah m <- 100 alpha <- 0.05 rho <- 0.1 F0
2012 Mar 14
1
qmvnorm function
Dear all, I need to use the "qmvnorm" function in mtvnorm package. Here is the error message I got > qmvnorm(0.05, tail="upper", sigma=var)$quantile Error in uniroot(pfct, interval = interval) : f() values at end points not of opposite sign There is no problem for 50th quantile. > qmvnorm(0.5, tail="upper", sigma=var)$quantile [1] -0.5325527 Can anyone