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

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

2020-01-07 Thread Sebastian Starke
Hi, recently I posted a question about how R computes the value for the "r.squared" statistic internally for weighted least squares linear models on crossvalidated.com (see: https://stats.stackexchange.com/questions/439590/how-does-r-compute-r-squared-for-weighted-least-squares) including a m

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
-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of IZHAK shabsogh > Sent: Monday, January 13, 2014 8:10 AM > To: r-help@r-project.org > Subject: [R] computation > > kindly help me fine what is the mistake with following: my aim is to > compute those s

[R] computation

2014-01-12 Thread IZHAK shabsogh
kindly help me fine what is the mistake with following:  my aim is to compute those steps and obtain a vector with values (3,5)  but i am geting (NAN,NAN) Q<-matrix(c(5,-3,-3,2),2,2) b<-rbind(0,1) H0<-diag(2) x0<-rbind(0,0) d0<-b g0<--b a0<--(t(g0)%*%d0)/(t(d0)%*%Q%*%d0) x1<-x0+a0[,1]*d0 dx0<-x1-x

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

[R] computation of hessian matrix

2013-11-01 Thread IZHAK shabsogh
below is a code to compute hessian matrix , which i need to generate 29 number of different matrices for example first element in x1 and x2 is use to generate let say matrix (M1) and second element in x1 and x2 give matrix (M2) upto  matrix (M29) corresponding to the total number of observations

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

[R] Computation Duration Time

2010-08-06 Thread TGS
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 guide http://www.R-project.org/posting-guid

Re: [R] Computation of largest eigenvalue

2010-07-30 Thread Ravi Varadhan
ecs for the dominant eigenvalue and corresponding eigenvector. How very large is your matrix? Ravi. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Christian Weiß Sent: Friday, July 30, 2010 9:32 AM To: r-help@r-project.org Subject: [R] Co

[R] Computation of largest eigenvalue

2010-07-30 Thread Christian Weiß
Hello, I am looking for an R function to compute only the largest eigenvalue (Perron-Frobenius eigenvalue) and its corresponding eigenvector of a square matrix (in fact, even only of a non-negative matrix). The function should also be able to deal with very large but sparse matrices. Any id

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:

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

2010-04-09 Thread Sven Garbade
Hi list, can anybody point me to the trick how glm is computing the dispersion parameter in quasi-poisson regression, eg. glm(...,family="quasipoisson")? Thanks ®ards, Sven __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

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

[R] Computation of AIC for gls models

2010-03-09 Thread Miguel Angel Rodríguez-Gironés Arbolí
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. Available at [http://cran.r-project.org/web/packages/PHYLOGR/index.html]) to correct for lack of inde

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

[R] computation of matrices in list of list

2009-08-22 Thread kathie
Dear R users, I have the list as follows; #-- > z [[1]] [[1]][[1]] matrix(A) [[1]][[2]] matrix(B) [[1]][[3]] matrix(C) [[2]] [[2]][[1]] matrix(D) [[2]][[2]] matrix(E) [[2]][[3]] matrix(F) #-

[R] Computation for specific 2^k factorial designs

2008-11-12 Thread Kenneth Roy Cabrera Torres
Hi R users: I want to know if there is any package that makes the specific computation 2^k factorial designs as in: George E. P. Box, J. Stuart Hunter and William G. Hunter. Statistics for Experimenters. Second Edition. 2005. John Wiley & Sons. They advice about the misuse of the ANOVA table in

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

[R] Computation of contour values - Speeding up computation

2008-09-10 Thread Andreas Wittmann
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, 1.5 * a, length=dim) z

[R] Computation of pD in R2WinBUGS

2008-08-11 Thread Nanye Long
Hi all, About how R2WinBUGS computes pD (effective number of parameters), in the manual it says that pD = var(deviance)/2. However, I run some data set and find that the reported pD not equal to var(deviance)/2, but much smaller than that. Is var(deviance)/2 the actual formular used in R2WinBUGS,