similar to: User-defined random variable

Displaying 20 results from an estimated 40000 matches similar to: "User-defined random variable"

2009 Sep 22
5
use of class variable in r as in Proc means of sas
Hi,everyone i need to calculate quartile values of a variable grouped by the other variable . same as in aggregate function(only median,mean or functions is possible-i think so) Could you please help me to achieve the same for other quartile values(5,10,25,75,90) as for median using aggregate. Thanks in advance. data : zip price 60000 567000 60001 478654 60004 485647 60001
2005 Jan 07
2
Getting empirical percentiles for data
Dear List, I have some discrete data and want to calculate the percentiles and the percentile ranks for each of the unique scores. I can calculate the percentiles with quantile(). I know that "ecdf" can be used to calculate the empirical cumulative distribution. However, I don't know how to exact the cumulative probabilities for each unique element. The requirement is similar
2011 Jul 15
2
Convert continuous variable into discrete variable
Dear all, I have a continuous variable that can take on values between 0 and 100, for example: x<-runif(100,0,100) I also have a second variable that defines a series of thresholds, for example: y<-c(3, 4.5, 6, 8) I would like to convert my continuous variable into a discrete one using the threshold variables: If x is between 0 and 3 the discrete variable should be 1 If x is between 3
2002 Jul 01
3
Discrete random variable
Hi, I would create a function rdiscrete that returns the value of a discrete random variable X defined on a subset which can change, and for the same probability for the issue, eg: X could sometimes take a value in the subset {2,3,4} with probability 1/3 for each issue, and sometimes X could take a value in the subset {2,3,4,5,6} with probability 1/5 for each issue, etc. The function should have
2009 Mar 08
1
typo in qpois help (PR#13583)
Full_Name: Manikandan Narayanan Version: 2.8.1 OS: Linux Submission from: (NULL) (155.91.45.231) Here is an excerpt from qpois help page (?qpois): The quantile is left continuous: 'qgeom(q, prob)' is the largest integer x such that P(X <= x) < q. I think the "qgeom" here should be "qpois" instead. Please correct this typo in ?qpois, since it's
2017 Aug 04
2
Latin hypercube sampling from a non-uniform distribution
Hello, I am performing a sensitivity analysis using a Latin Hypercube sampling. However, I have difficulty to draw a Hypercube sample for one variable. I?ve generated this variable from a Poisson distribution as follows: set.seed(5) mortality_probability <- round(ppois(seq(0, 7, by = 1), lambda = 0.9), 2) barplot(mortality_probability, names.arg = seq(0, 7, by = 1), xlab = "Age
2010 Jan 29
1
qpois Help problems (PR#14200)
Full_Name: Jerry W. Lewis Version: 2.10.1 OS: Windows XP Professional Submission from: (NULL) (198.180.131.21) In the line "The quantile is right continuous: qpois(q, lambda) is the smallest integer x such that P(X <= x) >= q." "q" is used as a probability when the Arguments section defines it to be a quantile. Also there are some representation problems where the
2017 Aug 07
0
Latin hypercube sampling from a non-uniform distribution
> How can I draw a Hypercube sample for the variable mortality_probability so > that this variable exhibits the same pattern as the observed distribution? One simple way is to use the uniform random output of randomLHS as input to the quantile function for your desired distribution(s). For example: q <- randomLHS(1000, 3) colnames(q) <- c("A", "B",
2000 Mar 24
3
quantiles of the hypergeometric distribution (PR#502)
Hello! I use R-version 1.0.0 To get the 0.95 quantile of the hypergeometric distribution with the parameters m=45000,n=5000 and k=600 I use the R-command > qhyper(0.95,45000,5000,600). The value obtained is 600. However, the true value is 552. The latter can be obtained for example by calling the corresponding distribution function with the R commands > x<-540:580 >
2004 Jan 09
4
Poisson distribution help requested
Could somebody help me to understand the syntax of R's ppois function? I'm looking to calculate the cumulative probability density of an observed value (y) given the expected mean (mu) and the level of significance (alpha). I'm coming from using SAS to do this and don't recognize the descriptions of the arguments for ppois. The definitions of lambda and p as stated in the R manuals
2003 Oct 01
3
fitting Markov chains
I need to find a computationally simple process for the movement of interest rates. In this simplified model, an interest rate can have 3--5 possible values, and its movement is characterized by a matrix of transition probabilities (ie, it is a Markov process). I would like to estimate this process from a given set of data. For example, let the interest rate time series be: 7 3 8 2 5 9 6
2006 Aug 03
3
Looking for transformation to overcome heterogeneity of variances
Dear All My data consists in 96 groups, each one with 10 observations. Levene's test suggests that the variances are not equal, and therefore I have tried to apply the classical transformations to have homocedasticity in order to be able to use ANOVA. Unfortunately, no transformation that I have used transforms my data into data with homocedasticity. The histogram of variances is at
2006 Aug 26
4
Can R compute the expected value of a random variable?
Dear All Can R compute the expected value of a random variable? Thanks in advance, Paul
2017 Aug 07
2
Latin hypercube sampling from a non-uniform distribution
Thanks for your answer. However, my variable is simulated from the cumulative distribution function of the Poisson distribution. So, the pattern obtained from the function "qpois" is not the same as the observed pattern (i.e., obtained from the function "ppois") set.seed(5) mortality_probability <- round(ppois(seq(0, 7, by = 1), lambda = 0.9), 2)
2005 Dec 23
2
convolution of the double exponential distribution
Is there any R function that computes the convolution of the double exponential distribution? If not, is there a good way to integrate ((q+x)^n)*exp(-2x) over x from 0 to Inf for any value of q and for any positive integer n? I need to perform the integration within a function with q and n as arguments. The function integrate() is giving me this message: "evaluation of function gave a
2024 Jan 23
0
Quantiles of sums of independent discrete random variables
Greetings, I have the following? Problem: Given k (=10) discrete independent random variables X_i with n_i (= 5 to 20) values each,compute quantiles of the distribution of the sum X = X_1+...+X_k. Here X has n=n_1 x n_2 ... n_k distinct values which is too large to list them all together with their probabilities. I tried several approaches: (A) Convolution: each X_j is approximated with
2002 Jun 06
2
covariance analysis model
Dear list users, I have trouble with covariance analysis. I measured nitrate concentrations in the soil (NO3) and the percentage of legumes (LEG, continuous), affected by 2 different CO2 concentrations (CO2, discrete). I suspect that CO2 has an effect on LEG and NO3, but also that LEG has an effect on NO3, so this is the formula I wrote to test this: NO3 ~ CO2 + LEG + CO2:LEG Will LEG be
2008 Jan 07
7
Can R solve this optimization problem?
Dear All, I am trying to solve the following maximization problem with R: find x(t) (continuous) that maximizes the integral of x(t) with t from 0 to 1, subject to the constraints dx/dt = u, |u| <= 1, x(0) = x(1) = 0. The analytical solution can be obtained easily, but I am trying to understand whether R is able to solve numerically problems like this one. I have tried to find an
2009 Apr 12
1
goodness of fit between two samples of size N (discrete variable)
Hello list: I generate by simulation (using different procedures) two sample vectors of size N, each corresponding to a discrete variable and I want to text if these samples can be considered as having the same probability distribution (which is unknown). What is the best test for that? I've read that Kolmogorov-Smirnov and Anderson-Darling tests are restricted to continuous data
2012 Feb 09
2
GLM - guess the distribution of the response variable
Dear all, I have question regarding GLMs: I have a discrete response variable and a continuous explaining variable. Like this: http://www.myimg.de/?img=example1db0f.jpg I want to use a GLM to investigate. I have to specify the "familiy of the distribution of the response variable" - or, maybe more precise, the "family of the distribution of the residuals of the response