similar to: R interface to C API Rf_logspace_{add,sub}?

Displaying 20 results from an estimated 200 matches similar to: "R interface to C API Rf_logspace_{add,sub}?"

2019 Jun 24
1
Calculation of e^{z^2/2} for a normal deviate z
>>>>> jing hua zhao >>>>> on Mon, 24 Jun 2019 08:51:43 +0000 writes: > Hi All, > Thanks for all your comments which allows me to appreciate more of these in Python and R. > I just came across the matrixStats package, > ## EXAMPLE #1 > lx <- c(1000.01, 1000.02) > y0 <- log(sum(exp(lx))) > print(y0) ## Inf
2019 Jun 24
2
Calculation of e^{z^2/2} for a normal deviate z
>>>>> William Dunlap via R-devel >>>>> on Sun, 23 Jun 2019 10:34:47 -0700 writes: >>>>> William Dunlap via R-devel >>>>> on Sun, 23 Jun 2019 10:34:47 -0700 writes: > include/Rmath.h declares a set of 'logspace' functions for use at the C > level. I don't think there are core R functions that call
2006 May 17
1
for loops and counter interpolation
Hi I'm sorry about the triviality of my problem. I have a vector (v) of three columns (logA, logB, id). I want to compute (and plot) the correlation between logA and logB for different thresholds of id (e.g. >30, etc). So I tried: for(i in 1:100){ points(cor(v$logA[v$id>i], v$logB[v$id>i], use="complete.obs"), i)) } (i created a plot object already) but it comes with
2009 Mar 12
3
help with predict and plotting confidence intervals
Dear R help, This seems to be a commonly asked question and I am able to run examples that have been proposed, but I can't seems to get this to work with my own data. Reproducible code is below. Thank you in advance for any help you can provide. The main problem is that I can not get the confidence lines to plot correctly. The secondary problem is that predict is not able to find my object
2019 Jun 24
0
Calculation of e^{z^2/2} for a normal deviate z
Hi All, Thanks for all your comments which allows me to appreciate more of these in Python and R. I just came across the matrixStats package, ## EXAMPLE #1 lx <- c(1000.01, 1000.02) y0 <- log(sum(exp(lx))) print(y0) ## Inf y1 <- logSumExp(lx) print(y1) ## 1000.708 and > ly <- lx*100000 > ly [1] 100001000 100002000 > y1 <- logSumExp(ly) > print(y1) [1] 100002000
2012 May 26
1
Kolmogorov-Smirnov test and the plot of max distance between two ecdf curves
Hi all, given this example #start a<-c(0,70,50,100,70,650,1300,6900,1780,4930,1120,700,190,940, 760,100,300,36270,5610,249680,1760,4040,164890,17230,75140,1870,22380,5890,2430) length(a) b<-c(0,0,10,30,50,440,1000,140,70,90,60,60,20,90,180,30,90, 3220,490,20790,290,740,5350,940,3910,0,640,850,260) length(b) out<-ks.test(log10(a+1),log10(b+1)) # max distance D
2019 Jun 23
2
Calculation of e^{z^2/2} for a normal deviate z
I agree with many the sentiments about the wisdom of computing very small p-values (although the example below may win some kind of a prize: I've seen people talking about p-values of the order of 10^(-2000), but never 10^(-(10^8)) !). That said, there are a several tricks for getting more reasonable sums of very small probabilities. The first is to scale the p-values by dividing the
2019 Jun 23
0
Calculation of e^{z^2/2} for a normal deviate z
include/Rmath.h declares a set of 'logspace' functions for use at the C level. I don't think there are core R functions that call them. /* Compute the log of a sum or difference from logs of terms, i.e., * * log (exp (logx) + exp (logy)) * or log (exp (logx) - exp (logy)) * * without causing overflows or throwing away too much accuracy: */ double Rf_logspace_add(double
2005 Apr 11
1
extracting correlations from nlme
Hi, I would like to know how (if) I can extract some of the information from the summary of my nlme. at present, I get a summary looking something like this: > summary(fit.nlme) Nonlinear mixed-effects model fit by maximum likelihood Model: MLKYLD ~ W4(DIM, logA, B, C) Data: ADHIS.x0 AIC BIC logLik 265314 265401.6 -132647 Random effects: Formula: list(logA ~ 1 , B ~
2012 Dec 15
3
interfacing with .Call
Hi My code is as following: #include <R.h> #include <Rinternals.h> //* the Projector part *// void Projector(double *L, int *dimL, double *G, int *dimG, double *W, int *dimW, int *xymod, int *dimxy, double *modif, int *dimif, double *Lsum) { ...} //* the interface part *// #define getDim(A) INTEGER(coerceVector(getAttrib(A,R_DimSymbol), INTSXP)) SEXP Projector5(SEXP L, SEXP G,
2011 Jun 19
2
please help! what are the different using log-link function and log transformation?
I'm new R-programming user, I need to use gam function. y<-gam(a~s(b),family=gaussian(link=log),data) y<-gam(loga~s(b), family =gaussian (link=identity),data) why these two command results are different? I guess these two command results are same, but actally these two command results are different, Why? -- View this message in context:
2005 Jun 04
2
[PATCH] line endings fix
The replay gain code has dos line endings in CVS, which causes problems for the Sun compiler, among others. Attached is a patch for the lazy, but it's probably easier to fix locally and commit. -r
2009 Jan 28
3
initial value in 'vmmin' is not finite
Dear r helpers I run the following code for nested logit and got a message that Error in optim(c(0, 0, 0, 0, 0.1, -2, -0.2), fr, hessian = TRUE, method = "BFGS") : initial value in 'vmmin' is not finite What does this mean? and how can I correct it? Thank you June > yogurt = read.table("yogurtnp.csv", header=F,sep=",")> attach(yogurt)>
2011 Aug 02
1
My R code is not efficient
Dear R users, I have two n*1 integer vectors, y1 and y2, where n is very very large. I'd like to compute elbp = 4^(y1) * 5^(y2) * sum_{i=0}^{max(y1, y2)} [{ (y1-i)! * (i)! * (y2-i)! }^(-1)]; that is, I need to compute "elbp" for each (y1, y2) pair. So I made R code like below, but I don't think it's efficient Would you plz tell me how to avoid this "for"
2009 Mar 02
1
initial gradient and vmmin not finite
Dear Rhelpers I have the problem with initial values, could you please tell me how to solve it? Thank you June > p = summary(maxLik(fr,start=c(0,0,0,1,0,-25,-0.2))) Error in maxRoutine(fn = logLik, grad = grad, hess = hess, start = start, : NA in the initial gradient > p = summary(maxLik(fr,start=c(0,0,0,1,0,-25,-0.2),method="BFGS")) Error in optim(start, func, gr =
2001 Sep 03
8
mixture distributions
Dear List, I am looking for a possibility to fit a mixture model under R using maximum likelihood estimation. Venables and Ripley describe a solution working under S+ (in MASS, 3. ed., p. 263) which requires the D system function and deriv3. This solution does not seem to be portable to R or at least I do not realise how. Is there anyone who a) knows how one could make the MASS-method run under
2009 Nov 16
0
mysql_adapter.rb:576: [BUG] Segmentation fault
Hello there, I am encountering segfaults with following: ruby 1.8.6 (2008-08-11) [i386-mswin32] on windows 7, rails 2.3.2, mysql (2.7.1) gem and MySQL 5.0.87-community-nt-log Tried with MySQL 5.1 and mysql gem 2.8.1 with no luck. Loga are showing: C:\Users\Alex\Documents\IT\ruote-web2>ruby script\server --port=3333 => Booting Mongrel => Rails 2.3.2 application starting on
2007 Nov 24
0
Help on State-space modeling
Hi all, I'm working on a term structure estimation using state-space modeling for 1, 2 and 3 factor models. When I started to read the functions on R, I got to the function ss on the library sspir. From what I understood this function is similar to SsfFit from S-PLUS. But for my models purpose there is something left to be desired. Its formulation follow these equations: *Y_t = F_t^T *
2010 Apr 15
0
lme posthoc comparisons in R
Hi there, I was hoping to post this message. Im hoping I;ve got the right spot?! Hi there, sorry for basic question but im very new to R. Im trying to run a lme model with two categorical variables, each having 6 (for the explanatory variable C.f) and 5 levels (for expl. variable D.f) respectively. The lme runs fine, summary and anova commands are ok. But now i've tried running posthoc
2004 Feb 24
2
Updated moduli file in OpenSSH 3.8
Hi, Can anybody briefly explain the significance of the updated moduli file? Is this a critical update? Should all existing installations update their moduli file? Thanks in advance, -- Dan