Re: [R] Computation of r.squared for weighted least squares linear models

2020-01-07 Thread Anindya Mozumdar
Dear Sebastian, I was able to replicate the R^2 value of 0.993019 using the function provided as the second answer (by Julien Massardier) to the following question - https://stats.stackexchange.com/questions/83826/is-a-weighted-r2-in-robust-linear-model-meaningful-for-goodness-of-fit-analys Tha

Re: [R] computation

2014-01-13 Thread Lisa S
In this calculation: (dg0%*%t(dx0)) is [,1] [,2] [1,]0 -0.75 [2,]0 0.50 So: exp2 = NaN It is extremely easy to find out the issue if you go back line by line, this is a basic procedure of debugging. Please do it yourself next time. On Mon, Jan 13, 2014 at 3:09 PM, IZHAK shabso

Re: [R] computation

2014-01-13 Thread PIKAL Petr
Hi Those have zero and dividing by zero produces NA > (dg0%*%t(dx0)) [,1] [,2] [1,]0 -0.75 [2,]0 0.50 > (dx0%*%t(dg0)) [,1] [,2] [1,] 0.00 0.0 [2,] -0.75 0.5 > NAs propagates in further computation. Regards Petr > -Original Message- > From: r-help-boun...@r-pro

Re: [R] computation of hessian matrix

2013-11-03 Thread IZHAK shabsogh
On Sunday, November 3, 2013 3:17 PM, IZHAK shabsogh wrote: Hi, another problem after getting the above hessian matrix i am suppose to use it and fine the sum of the product of the hessian and the residuals, for the hessian is generated from the above while the residual is also obtain from

Re: [R] computation of hessian matrix

2013-11-01 Thread Suzen, Mehmet
On 1 November 2013 11:06, IZHAK shabsogh wrote: > below is a code to compute hessian matrix , which i need to generate 29 > number of different matrices for example first You may consider using Numerical Derivatives package for that instead, see: http://cran.r-project.org/web/packages/numDeriv/v

Re: [R] Computation Duration Time

2010-08-06 Thread Erik Iverson
?Rprof or ?system.time TGS wrote: Is there a way to find out what the computation duration time was to complete executing a code chunk? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guid

Re: [R] Computation of largest eigenvalue

2010-07-30 Thread Ravi Varadhan
There is the arpack() function in "igraph" package for computing leading eigenvalues, but I am not sure how well it can handle "very" large matrices. I have coded up an accelerated power method and have used it on dense matrices of order 5000. It takes around 9-10 secs for the dominant eigenvalu

Re: [R] computation of dispersion parameter in quasi-poisson glm

2010-04-09 Thread Prof Brian Ripley
On Fri, 9 Apr 2010, Sven Garbade wrote: Hi list, can anybody point me to the trick how glm is computing the dispersion parameter in quasi-poisson regression, eg. glm(...,family="quasipoisson")? It isn't. glm() does not need (and does not compute) the dispersion parameter. summary.glm will

Re: [R] computation of dispersion parameter in quasi-poisson glm

2010-04-09 Thread Achim Zeileis
On Fri, 9 Apr 2010, Sven Garbade wrote: Hi list, can anybody point me to the trick how glm is computing the dispersion parameter in quasi-poisson regression, eg. glm(...,family="quasipoisson")? It's the sum of squared Pearson residuals divided by the residual degrees of freedom. For example:

Re: [R] Computation of AIC for gls models

2010-03-09 Thread Ben Bolker
Miguel Angel Rodríguez-Gironés Arbolí eeza.csic.es> writes: > > Dear Colleagues, > > We are using the phylog.gls.fit() function from the R package > "PHYLOGR" (Diaz-Uriarte R, Garland T: > PHYLOGR: Functions for phylogenetically based statistical > analyses. 2007. [snip] > ... we would wa

Re: [R] computation of matrices in list of list

2009-08-22 Thread Benilton Carvalho
result <- Reduce("+", unlist(z, recursive=FALSE)) b On Aug 22, 2009, at 2:03 PM, kathie wrote: Dear Gabor Grothendieck, thank you for your comments. Ive already tried that. but I've got this error message. Reduce("+",z) Error in f(init, x[[i]]) : non-numeric argument to binary operato

Re: [R] computation of matrices in list of list

2009-08-22 Thread David Winsemius
On Aug 22, 2009, at 1:03 PM, kathie wrote: Dear Gabor Grothendieck, thank you for your comments. Ive already tried that. but I've got this error message. Reduce("+",z) Error in f(init, x[[i]]) : non-numeric argument to binary operator > Reduce("+", c( LL[[1]], LL[[2]] ) ) [,1] [

Re: [R] computation of matrices in list of list

2009-08-22 Thread Steve Lianoglou
Hi Kathie, On Sat, Aug 22, 2009 at 1:03 PM, kathie wrote: Dear Gabor Grothendieck, > > > thank you for your comments. > > Ive already tried that. but I've got this error message. > > > > Reduce("+",z) > Error in f(init, x[[i]]) : non-numeric argument to binary operator > > > anyway, thanks > >

Re: [R] computation of matrices in list of list

2009-08-22 Thread kathie
Dear Gabor Grothendieck, thank you for your comments. Ive already tried that. but I've got this error message. > Reduce("+",z) Error in f(init, x[[i]]) : non-numeric argument to binary operator anyway, thanks ps. > is.matrix(z[[1]][[1]]) [1] TRUE I guess the reason "Reduce" doesn't wor

Re: [R] computation of matrices in list of list

2009-08-22 Thread Gabor Grothendieck
See this: https://stat.ethz.ch/pipermail/r-help/2009-August/208002.html On Sat, Aug 22, 2009 at 11:41 AM, kathie wrote: > > Dear R users, > > I have the list as follows; > > #-- > >> z > > [[1]] > [[1]][[1]] > > matrix(A) > > [[1]][[2]] > > matr

Re: [R] Computation of contour values - Speeding up computation

2008-09-20 Thread Andreas Wittmann
Thank you very much, yes maybe its worth working on it. best regards Andreas Uwe Ligges wrote: Andreas Wittmann wrote: Dear R useRs, i have the following code to compute values needed for a contour plot "myContour" <- functio

Re: [R] Computation of contour values - Speeding up computation

2008-09-10 Thread Uwe Ligges
Andreas Wittmann wrote: Dear R useRs, i have the following code to compute values needed for a contour plot "myContour" <- function(a, b, plist, veca, vecb, dim) { tmpb <- seq(0.5 * b, 1.5 * b, length=dim) tmpa <- seq(0.5 * a