search for: ranuni

Displaying 4 results from an estimated 4 matches for "ranuni".

Did you mean: rankin
2010 Dec 23
1
Reconcile Random Samples
Is there a way to generate identical random samples using R's runif function and SAS's ranuni function? I have assigned the same seed values in both software packages, but the following results show different results. Thanks! R === > set.seed(6) > random <- runif(10) > random [1] 0.6062683 0.9376420 0.2643521 0.3800939 0.8074834 0.9780757 0.9579337 [8] 0.7627319 0.5096485...
2009 Feb 25
4
Have a function like the "_n_" in R ? (Automatic count function )
Have the counter function in R ? if we use the software SAS /*** SAS Code **************************/ data tmp(drop= i); retain seed x 0; do i = 1 to 5; call ranuni(seed,x); output; end; run; data new; counter=_n_; ***** this keyword _n_ ****; set tmp; run; /* _n_ (Automatic variables) are created automatically by the DATA step or by DATA step statements. */ /*** Output ******************************** counter seed x 1 584043288...
2008 Jun 23
3
Simulating Gaussian Mixture Models
Hi, Is there any package that I can use to simulate the Gaussian Mixture Model , which is a mixture modeling method that is widely used in statistical learning theory. I know there is a mclust, however, I think it is a little bit different from my problem. Thanks very much.. regards. -------------------------- Peng Jiang ?? Ph.D. Candidate Antai College of Economics &
2006 Mar 27
0
Graded Response Model Simulation (SAS code conversion)
...ction, and call it up inside a simulation code. Here is the SAS code: %MACRO GRGEN; DO G=1 TO NCAT-1; Z=EXP(A*(THETA-BB(G))); PS(G)=Z/(1+Z); END; PP(1)=1-PS(1); PP(NCAT)=PS(NCAT-1); DO G=2 TO NCAT-1; PP(G)=PS(G-1)-PS(G); END; X=RANUNI(-1); SUMP=0; R(J)=1; DO K=1 TO NCAT-1; SUMP=SUMP+PP(K); IF X>SUMP THEN R(J)=K+1; END; %MEND GRGEN; Now, I am totally unfamiliar to simulation in R. So does anyone have a good reference I could go to convert this?...