search for: f1c

Displaying 7 results from an estimated 7 matches for "f1c".

Did you mean: f1
2013 Feb 02
3
vectorisation
Hi I'm trying to set up a simulation problem without resorting to (m)any loops. I want to set entries in a data frame of zeros ('starts' in the code below) to 1 at certain points and the points have been randomly generated and stored in a separate data.frame ('sl'), which has the same number of columns. An example of the procedure is as follows: ml <-
2005 Oct 23
1
question about technieque do with large computation
The green book tells:"The basic technique is classic :keep it simple ."A long ,complicated expression or function is less fravorable than" a relatively small computations that combines calls to a few other functions to perform its tasks." But I don't get the point totally.Can anyone give me an example to make me understand this rules totally? ps: Is it mean that f1 is
2010 Oct 03
1
Johnson Distribution Fit
...a = g djohn = function(x,xi,l,d,g) (d/(l*sqrt(2*pi)*((x-xi)/l)*(1-((x-xi)/l))))*exp[-0.5*(g + d*log(((x-xi)/l)/(1-((x-xi)/l))))^2] pjohn = function(x,xi,l,d,g) pnorm(g + d*log(((x-xi)/l)/(1-((x-xi)/l)))) qjohn = function(p,xi,l,d,g) xi + (l*exp((qnorm(p) - g)/d))/(1 + exp((qnorm(p) - g)/d)) f1c <- fitdist(data2,"john",start=list(xi = 0.5 ,l = 50, d = 1, g = 1)) Error in fitdist(data2, "john", start = list(xi = 0.5, l = 50, d = 1, : the function mle failed to estimate the parameters, with the error code 100 In addition: Warning message: In log(((x...
2005 Apr 27
1
RE: [R] when can we expect Prof Tierney's compiled R?
...(x, iA) for (i in iA) x[i-1] > f3 <- function(x, iA) for (i in iA) 1 > f4 <- function(x, iA) for (i in iA) x[i] = 1.0 > f5 <- function(x, iA) for (i in iA) i-1 > f6 <- function(x, iA) for (i in iA) i > > Make byte compiled versions: > > f1c <- cmpfun(f1) > f2c <- cmpfun(f2) > f3c <- cmpfun(f3) > f4c <- cmpfun(f4) > f5c <- cmpfun(f5) > f6c <- cmpfun(f6) > > and run them: > > > system.time(f1(x, iA)) > [1] 5.43 0.04 5.56 0.00 0.00 > > syst...
2005 Apr 22
1
RE: [R] when can we expect Prof Tierney's compiled R?
If we are on the subject of byte compilation, let me bring a couple of examples which have been puzzling me for some time. I'd like to know a) if the compilation will likely to improve the performance for this type of computations, and b) at least roughly understand the reasons for the observed numbers, specifically why x[i]<- assignment is so much slower than x[i] extraction. The loops
2009 Jun 20
1
how to apply the dummy coding rule in a dataframe with complete factor levels to another dataframe with incomplete factor levels?
Dear R helpers: Sorry to bother for a basic question about model.matrix. Basically, I want to apply the dummy coding rule in a dataframe with complete factor levels to another dataframe with incomplete factor levels. I used model.matrix, but could not get what I want. The following is an example. #Suppose I have two dataframe A and B
2003 Jun 26
1
HELP
...C(&-O;F9T97-T+F,@(&-O;F9T97-T+F,@,3XF-0IC;VYF M:6=U<F4Z,S,T,SH at 8VAE8VMI;F<@=VAE=&AE<B!T:&4@;&EN:V5R("@O=7-R M+V)I;B]L9"D@<W5P<&]R=',@<VAA<F5D(&QI8G)A<FEE<PIC;VYF:6=U<F4Z M-# T,CH at 8VAE8VMI;F<@:&]W('1O(&AA<F1C;V1E(&QI8G)A<GD@<&%T:',@ M:6YT;R!P<F]G<F%M<PIC;VYF:6=U<F4Z-# W,#H at 8VAE8VMI;F<@=VAE=&AE M<B!S=')I<'!I;F<@;&EB<F%R:65S(&ES('!O<W-I8FQE"F-O;F9I9W5R93HT M,#@T.B!C:&5C:VEN9R!D>6YA;6EC(&QI;FME<B!C:&%R86-T97)I...