search for: stats12

Displaying 5 results from an estimated 5 matches for "stats12".

Did you mean: stats1
2012 Oct 26
3
how to make simulation faster
Dear R users, I need to run 1000 simulations to find maximum likelihood estimates. I print my output as a vector. However, it is taking too long. I am running 50 simulations at a time and it is taking me 30 minutes. Once I tried to run 200 simulations at once, after 2 hours I stopped it and saw that only about 40 of them are simulated in those 2 hours. Is there any way to make my simulations
2012 Oct 20
4
Error in integrate(integrand, 0, Inf) : non-finite function value
Dear R users, When I run the code below, I get the error "Error in integrate(integrand, 0, Inf) : non-finite function value". The code works if the function returns only "sum(integ)". However, I want to add "cmh" to it. When I add "cmh" I get that error. I can't figure out why this is happening because my integrate function has nothing to do with
2012 Oct 17
1
for loop output
Dear R users, In the code below, I am trying to print the result of my loop function. The output first gives me the result for k=1, and then for k=1 and k=2. I only want the last output which is [,1] [,2] [1,] 0.1700065 0.5002659 [2,] 0.3080273 0.4954731 [3,] 0.4844886 0.4544306 [4,] 0.5062987 0.1868154 [5,] 0.5846982 0.4353522 [6,] 0.4332621 0.2202922 [7,] 0.4391985
2012 Oct 19
2
likelihood function involving integration, error in nlm
Dear R users, I am trying to find the mle that involves integration. I am using the following code and get an error when I use the nlm function d<-matrix(c(1,1,0,0,0,0,0,0,2,1,0,0,1,1,0,1,2,2,1,0),nrow=10,ncol=2) h<-matrix(runif(20,0,1),10) integ<-matrix(c(0),nrow=10, ncol=2) ll<-function(p){ for (k in 1:2){ for(s in 1:10){ integrand<-function(x)
2012 Oct 29
0
why isn't integrate function working in a likelihood
Dear R users, I have been trying to solve for mle's of a function that involves an integral and I keep getting an error. I created an example to work on first and even the simple example doesn't give me the mle's. I am getting the error "Error in integrate(integrand, 0, Inf) : non-finite function value". I divided my likelihood function into two parts, one part involves