simulation

  1. S

    Generating data from exponential distribution in r.

    Suppose X~exp(.67), Y~exp(.8), Z~exp(.43). X and Y are correlated with a correlation coefficient of -0.6. Again X and Z are correlated with a correlation coefficient of -0.6. How can I generate data from X, Y and Z by incorporating this correlation. I know if they were uncorrelated, I could...
  2. Y

    (URGENT!) Simulating expectations and a conditional expectation

    I need to simulate a conditional expectation of the form: E (Xi^2 /(||X||^2 +h) | R^2 = ||X-T||^2 + ||U||^2 , Zi^2= (Xi - Ti)^2) Where X~N(T,I_p), U ~N(0,I_n) and ||.|| being the euclidean norm, i found this result using the nadaraya-watson approximation (https://arxiv.org/abs/1306.1182), but...
  3. hlsmith

    Sample Size Calc for Right Skewed Data

    I have a request from a person for a sample size calculation. When I requested information about the potential study data they provided two means and standard deviations from a prior study. Given the values (x1=7; s1=6 and x2=0.5; s2 = 2) it appears the data are right skewed. I can simulate...
  4. rogojel

    Simulating a logistic regressio - scary results

    Hi, I tried to work out the necessary sample size for a logistic regression by simulations and got some scary results. If anyone could check the code below, it would be a great help. I simulate a logistic regression with two normalized variables, one having a fixed odds ratio of 1.4 the other a...
  5. rogojel

    Bootstrap and hypothesis test

    Hi, I have to decide whether two groups have the same variance or not. My sample size is less then impressive, 13 data points per group. I ran Bartletts test and got a p-value of 0.09 - but I suspected that the relatively high value might be due to the small sample size. So, I ran a...
  6. U

    Efficient R coding

    Consider the following data frame: dat <- data.frame(x=c(0,128.96,0,397.37,56.80,0,801.79,340.79), y=c(40,97,172,186,210,246,327,432), d=c(1,0,0,0,0,1,0,1), A=c(0,1,0,1,1,0,1,1), B=c(0,1,0,1,1,0,1,1)) For each value of the column y which satisfies...
  7. U

    difference between estimating variance and standard deviation.

    In a simulation study, is there any difference between \bullet to estimate the variance \sigma^2, 1000 times and taking its average, and \bullet to estimate the standard deviation \sigma, 1000 times and taking its average? Can I do anyone of these? Is there any preference of doing a...
  8. S

    Simulating a ranking/draft system in R

    Trying to simulate a draft/ranking system based on prior, already existing individual team rankings in R. Here is the full link to the question: http://stackoverflow.com/questions/42093872/player-ranking-draft-system-simulate-a-draft-overall-ranking-system-based-on-pa
  9. D

    Data set simulation

    Answered on other threads, sorry for posting
  10. A

    Parameter finding - can you give me a basic guide?

    Hey there, I started working with a detector, and I was asked to model the efficiency of this it. I have collected lots of data about the efficiency of this detector, and have lots of sampled datasets like efficiency vs "some important parameter". The number of important independent...
  11. M

    Simulation for logistic regression in R

    Dear All, I would like to simulate data for logistic regression and I need to have below variables x1=numeric (mean=25,std=5) x2=numeric (mean=50,std=10) x3=factor variables with 5 levels x4=factor variable with 3 levels x5=factor variable with 2 levels How can I do that? Thank you
  12. B

    Excel Simulation (Monte Carlo) help

    Hi all, I've been racking my non-statistical brain on my Excel simulation (monte carlo sim predicts profit). I have created the model and as I review the outputs, I'm not confident that it's correct. With that said, is there anyone who could review it and let me know if you see any obvious...
  13. M

    Extract final values from one run of a simulation

    I ran a simulation using R and because there were a large number of permutations (>10,000) we stored the output of each permutation in a separate file. For each permutation we did 1000 runs of the simulation. The attached file contains the 1000 runs that make up one of these permutations. I...
  14. C

    Problem with nlme() convergence in a Monte Carlo simulation

    Hello. As part of a Monte Carlo simulation, I'm programming some model comparisons on generated data. The underlying relationship in the data is a two-parameter exponential curve (y=a*e^(bx)), and among the models being compared are hyperbolic (y=a/(1+bx)), and quadratic (y=b*(x-a)^2)...
  15. F

    Simulation with Conjoint Analysis

    Hi everyone, With SPSS when I run a simulation with conjoint analysis I got this message: "142 out of 155 subjects are used in the Bradley-Terry-Luce and Logit methods because these subjects have all nonnegative scores". I think SPSS excluded those respondents because their simulated...
  16. I

    Compute an optimization stress from size distribution density and abundance

    Hi everyone, Here's the shortest version of this optimization problem: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - I need to find out the value of one growth rate and one mortality rate by simulating a population between two assessment...
  17. C

    Guidance appreciated: Multinomial mixed data types population characterization

    Guidance appreciated: I have approx 40k records from about 50 colleges. Data is FERPA-compliant one student per record, with age (integer), gender, ethnicity, college, course, and section. Course is selected from a set of size three. I need some guidance on how to characterize this population...
  18. C

    Guidance please: multinomial mixed data types

    Guidance appreciated: I have approx 40k records from about 50 colleges. Data is one student per record, with age (integer), gender, ethnicity, college, course, and section. Course is selected from a set of size three. I need some guidance on how to characterize this population (or these samples...
  19. I

    MS Thesis Topic Recommendations from Journals concentrating on Parametric Tests

    I would like to know if you can recommend sites where journals, particularly statistical researches, can be viewed completely. Alternatively, can you suggest recommendations based on your previous studies/research that I can work on and explore for a Masters Thesis. Any parametric method...
  20. P

    [Compounded returns series simulation] PDF of product of normal random variables

    Hello, To simulate compounded returns in financial series, I'm trying to find an algorithm to compute the PDF of the product of "n" normally-distributed random variables. Even if, actually, the variables are not normally distributed, in order to simplify it I could assume that they have the...