similar to: problem on simulation code (the loop unable to function effectively)

Displaying 20 results from an estimated 200 matches similar to: "problem on simulation code (the loop unable to function effectively)"

2016 Apr 19
0
problem on simulation code (the loop unable to function effectively)
Hi Jeem, First, please send questions like this to the help list, not me. I assume that you are in a similar position to sjtan who has been sending almost exactly the same questions. The problem is not in the loops (which look rather familiar to me) but in your initial assignments at the top. For instance: scale parameter=(1,1.5,2,2.5,3) produces an error which has nothing to do with the
2016 Apr 18
0
R [coding : do not run for every row ]
You can make this much more readable with apply functions. result <- apply( all_combine1, 1, function(x){ p.value <- sapply( seq_len(nSims), function(sim){ gamma1 <- rgamma(x["m"], x["sp(skewness1.5)"], x["scp1"]) gamma2 <- rgamma(x["n"], x["scp1"], 1) gamma1 <- gamma1 -
2016 Apr 18
0
R [coding : do not run for every row ]
Always keep the mailing list in cc. The code runs for each row in the data. However I get the feeling that there is a mismatch between what you think that is in the data and the actual data. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance Kliniekstraat 25 1070
2016 Apr 18
3
R [coding : do not run for every row ]
Hi, i am sorry, the output should be values between 0 and 0.1 and not supposed to be 1.00, it is because they are type 1 error rate. And now i get output 1.00 for several samples,rhis is no correct. The loop do not run for every row. i do not know where is my mistake. As i use the same concept on normal distribution setup, i get the result. Sent from my phone On Thierry Onkelinx
2016 Apr 17
2
R [coding : do not run for every row ]
i have combined all the variables in a matrix, and i wish to conduct a simulation row by row. But i found out the code only works for the every first row after a cycle of nine samples. But after check out the code, i don know where is my mistake... can anyone pls help .... #For gamma disribution with equal skewness 1.5 #to evaluate the same R function on many different sets of data
2016 Apr 18
0
R [coding : do not run for every row ]
Dear anonymous, The big mistake in the output might be obvious to you but not to others. Please make clear what the correct output should be or at least what is wrong with the current output. And please DO read the posting guide which asks you not to post in HTML. ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie &
2011 Jun 07
0
WinBUGS on survival, simple but confusing question
Hi All, I'm using WinBUGS on a very simple survival model (log-normal with one covariate "Treat"), but I cannot understand the way it handles censored data. I'm posting the R file which generates the data from pre-specified parameters, as well as the .bug file. The question is, if I use NA to denote the censored data (as suggested by the example Mice in WinBUGS Example Vol.I),
2009 Jun 05
2
p-values from VGAM function vglm
Anyone know how to get p-values for the t-values from the coefficients produced in vglm? Attached is the code and output ? see comment added to output to show where I need p-values + print(paste("********** Using VGAM function gamma2 **********")) + modl2<- vglm(MidPoint~Count,gamma2,data=modl.subset,trace=TRUE,crit="c") + print(coef(modl2,matrix=TRUE))
2009 Jun 16
0
Generation from COX PH with gamma frailty
Hello, I want to generate data set from Cox PH model with gamma frailty effects. theta(parameter for frailty distribution)=2 beta=1.5 n=300 cluster size=30 number of clusters=10 I think I should first generate u from Gamma(Theta,theta) and then using this theta I could not decide how I should generate the survival times? Is there any package for this? or any document you could suggest? Any
2009 Jun 26
1
predicted values after fitting gamma2 function
Question: after fitting a gamma function to some data, how do I get predicted values? I'm a SAS programmer, I new R, and am having problems getting my brain to function with the concept of "object as class ...". The following is specifics of what I am doing: I'm trying to determine the pdf from data I have created in a simulation. I have generated frequency counts
2009 Apr 11
2
who happenly read these two paper Mohsen Pourahmadi (biometrika1999, 2000)
http://biomet.oxfordjournals.org/cgi/reprint/86/3/677 biometrika1999 http://biomet.oxfordjournals.org/cgi/reprint/94/4/1006 biometrika2000 Hi All: I just want to try some luck. I am currenly working on my project,one part of my project is to reanalysis the kenward cattle data by using the method in Mohsen's paper,but I found I really can get the same or close output as he did,so,any
2004 Jun 12
2
ordered probit or logit / recursive regression
> I make a study in health econometrics and have a categorical > dependent variable (take value 1-5). I would like to fit an ordered > probit or ordered logit but i didn't find a command or package who > make that. Does anyone know if it's exists ? R is very fancy. You won't get mundane things like ordered probit off the shelf. (I will be very happy if someone will show
2007 May 08
0
Question on bivariate GEE fit
Hi, I have a bivariate longitudinal dataset. As an example say, i have the data frame with column names var1 var2 Unit time trt (trt represents the treatment) Now suppose I want to fit a joint model of the form for the *i* th unit var1jk = alpha1 + beta1*timejk + gamma1* trtjk + delta1* timejk:trtjk + error1jk var2 = alpha2 + beta2*timejk + gamma2* trtjk + delta2* timejk:trtjk +
2012 Dec 04
1
Solve system of equations (nleqslv) only returns origin
I'm solving 4 complex equations simultaneously. Code is below. The code returns only zero's for the solution though there should also be a non-zero result. I'm pretty confident that the equations are correct because they are straight from a published paper and I checked them pretty thoroughly. The parameter values I used are from the published paper as well. Any suggestions for how
2002 Apr 22
3
glm() function not finding the maximum
Hello, I have found a problem with using the glm function with a gamma family. I have a vector of data, assumed to be generated by a gamma distribution. The parameters of this gamma distribution are estimated in two ways (i) using the glm() function, (ii) "by hand", using the optim() function. I find that the -2*likelihood at the maximum found by (i) is substantially larger than that
2009 Aug 30
2
Sampling encoder timings between libtheora-1.0 & libtheora-1.1beta3
As requested by Ralph in my introduction e-mail to this list [1], I've gone ahead and done some sample test timings for encoding between libtheora-1.0 and libtheora-1.1beta3, as available from the Theora website [2]. So far, I've tested with 4 different files that I generated with content I already have. The files, in brief, are the following: 1. planet-earth-360x240.yuv4mpeg - A
2006 Oct 27
0
VGAM package released on CRAN
Dear useRs, upon request, the VGAM package (currently version 0.7-1) has been officially released on CRAN (the package has been at my website http://www.stat.auckland.ac.nz/~yee/VGAM for a number of years now). VGAM implements a general framework for several classes of regression models using iteratively reweighted least squares (IRLS). The key ideas are Fisher scoring, generalized linear and
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
Hi Jean-Marc, Hi Jim, I have also seen some problems with the 1.1.8 release on the C55x. So far I have boiled down the issues to the following: 1) We need our own "fixed_xx.h" header file. I don't know why, and haven't had time to investigate, but there is a definite improvement when I use the attached fixed_c55x.h file which has turned all the maths into inline functions.
2007 Feb 17
1
Solve in maximum likelihood estimation
Hi, I got the following problem. I am doing a maximum likelihood estimation for a Kalman Filter. For this purpose, I have to invert an error matrix Ffast of dimension "no. parameters X no.parameters". The usualy optim methods often find only local minima, so I decided to make the optimization using the SANN algorithm, which is very slow already. However, this becomes a real problem
2016 Apr 06
0
R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]
You have quite a few mistakes in your example. The code below works for me - you can wrap it in a function if you like. I think you will need a lot more practice before you can write something like this in R as you are missing close braces and haven't really worked out the difference between the number of calculations you are doing for each replication and the number of replications. It takes