[R] bayesian mixed logit

2012-01-17 Thread Carlo Fezzi (ENV)
Dear all, I am writing an R code to fit a Bayesian mixed logit (BML) via MCMC / MH algorithms following Train (2009, ch. 12). Unfortunately, after many draws the covariance matrix of the correlated random parameters tend to become a matrix with almost perfect correlation, so I think there is

Re: [R] {Spam?} Re: mgcv, testing gamm vs lme, which degrees of freedom?

2010-06-21 Thread Carlo Fezzi
many datapoints, rendering them practically useless again. So in the end, it always boils down to interpretation. Cheers Joris On Fri, Jun 18, 2010 at 10:29 PM, Carlo Fezzi c.fe...@uea.ac.uk wrote: Thanks Joris, I understand your point regarding the need for the two models to be nested

Re: [R] {Spam?} RE: {Spam?} Re: mgcv, testing gamm vs lme, which degrees of freedom?

2010-06-21 Thread Carlo Fezzi
-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Joris Meys Sent: Monday, June 21, 2010 12:09 PM To: Carlo Fezzi Cc: r-help@r-project.org Subject: Re: [R] {Spam?} Re: mgcv, testing gamm vs lme,which degrees of freedom? Hi Carlo, You should get the book of Simon Wood and read

Re: [R] {Spam?} RE: {Spam?} RE: {Spam?} Re: mgcv, testing gamm vs lme, which degrees of freedom?

2010-06-21 Thread Carlo Fezzi
: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Joris Meys Sent: Monday, June 21, 2010 12:09 PM To: Carlo Fezzi Cc: r-help@r-project.org Subject: Re: [R] {Spam?} Re: mgcv, testing gamm vs lme,which degrees of freedom? Hi Carlo, You should get

Re: [R] mgcv, testing gamm vs lme, which degrees of freedom?

2010-06-18 Thread Carlo Fezzi
, Jun 16, 2010 at 9:33 PM, Carlo Fezzi c.fe...@uea.ac.uk wrote: Dear all, I am using the mgcv package by Simon Wood to estimate an additive mixed model in which I assume normal distribution for the residuals. I would like to test this model vs a standard parametric mixed model

Re: [R] mgcv, testing gamm vs lme, which degrees of freedom?

2010-06-18 Thread Carlo Fezzi
the other take this into account? Sorry if this may sound dull, many thanks for your help, Carlo On Wednesday 16 June 2010 20:33, Carlo Fezzi wrote: Dear all, I am using the mgcv package by Simon Wood to estimate an additive mixed model in which I assume normal distribution for the residuals

Re: [R] mgcv, testing gamm vs lme, which degrees of freedom?

2010-06-18 Thread Carlo Fezzi
... Cheers Joris On Fri, Jun 18, 2010 at 6:27 PM, Carlo Fezzi c.fe...@uea.ac.uk wrote: Dear Simon, thanks a lot for your prompt reply. Unfortunately I am still confused about which is the correct way to test the two models... as you point out: why in my example the two models have the same

[R] mgcv, testing gamm vs lme, which degrees of freedom?

2010-06-16 Thread Carlo Fezzi
Dear all, I am using the mgcv package by Simon Wood to estimate an additive mixed model in which I assume normal distribution for the residuals. I would like to test this model vs a standard parametric mixed model, such as the ones which are possible to estimate with lme. Since the smoothing

[R] faster GLS code

2010-01-07 Thread Carlo Fezzi
of a bigger code and needs to run several times). Any suggestion would be greatly appreciated. Carlo *** Carlo Fezzi Senior Research Associate Centre for Social and Economic Research on the Global Environment (CSERGE), School of Environmental Sciences

Re: [R] faster GLS code

2010-01-07 Thread Carlo Fezzi
University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: Carlo Fezzi c.fe...@uea.ac.uk Date: Thursday, January 7, 2010 12:13 pm Subject: [R] faster GLS code To: r-help@r-project.org Dear helpers, I wrote a code which estimates a multi-equation model

[R] constrOptim converging not to the optimal values

2008-05-19 Thread Carlo Fezzi
)) OPTIMIZATION a-constrOptim(outer.iteration = 500, control = list(maxit=1), theta=(high-low)/(N+1)* N:1, f=negdet, ui = u.s, ci=c.s, method=Nelder-Mead) ** Carlo Fezzi Senior Research Associate Centre for Social Research on the Global

[R] hessian in constrained optimization (constrOptim)

2008-05-12 Thread Carlo Fezzi
constrOptim does not allow this argument which, on the other hand, is allowed in optim. I would be extremely grateful if anybody could suggest a way I could use to I obtain the values of the hessian matrix... Many thanks, Carlo ** Carlo Fezzi

[R] R computing speed

2007-12-11 Thread Carlo Fezzi
be really grateful if anybody could help me with this issue, I attach my code below. Many thanks, Carlo *** Carlo Fezzi Centre for Social and Economic Research on the Global Environment (CSERGE), School of Environmental Sciences, University of East Anglia

Re: [R] R computing speed

2007-12-11 Thread Carlo Fezzi
To: Carlo Fezzi Cc: r-help@r-project.org Subject: Re: [R] R computing speed I would suggest that you use Rprof to get a profile of the code to see where time is being spent. You did not provide commented, minimal, self-contained, reproducible code, so it is hard to tell from just looking