Hi, I am trying to perform Maximum Likelihood estimation of a Multivariate model (2 independent variables + intercept) with autocorrelated errors of 1st order (ar(1)). Does R have a function for that? I could only find an univariate option (ar.mle function) and when writing my own I find that it is pretty memory-consuming (and sometimes wrong) so there must be a better way. Thanks, KB
I get this message: Error: could not find function "gls" (and also) Error: could not find function "lm.gls" Which package is that in? Thanks, KB> Have you tried gls()? > > > ------------------------------------------------------------------------ > ---- > ir. Thierry Onkelinx > Instituut voor natuur- en bosonderzoek / Research Institute for Nature > and Forest > Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, > methodology and quality assurance > Gaverstraat 4 > 9500 Geraardsbergen > Belgium > tel. + 32 54/436 185 > Thierry.Onkelinx at inbo.be > www.inbo.be > > Do not put your faith in what statistics say until you have carefully > considered what they do not say. ~William W. Watt > A statistical analysis, properly conducted, is a delicate dissection of > uncertainties, a surgery of suppositions. ~M.J.Moroney > > -----Oorspronkelijk bericht----- > Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] > Namens Konrad BLOCHER > Verzonden: woensdag 6 februari 2008 12:12 > Aan: r-help at r-project.org > Onderwerp: [R] Multivariate Maximum Likelihood Estimation > > Hi, > > I am trying to perform Maximum Likelihood estimation of a Multivariate > model (2 independent variables + intercept) with autocorrelated errors > of > 1st order (ar(1)). > > Does R have a function for that? I could only find an univariate option > (ar.mle function) and when writing my own I find that it is pretty > memory-consuming (and sometimes wrong) so there must be a better way. > > Thanks, > > KB > > ______________________________________________ > R-help at 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-guide.html > and provide commented, minimal, self-contained, reproducible code. >
OK I got gls running but this is the error message that I got:> gls_results <- gls(LnWRPK ~ LnWGDP+LnWYIELD,correlation = corAR1)Error in switch(mode(x), "NULL" = structure(NULL, class = "formula"), : invalid formula Google didn't give any results unfortunately. Help! :) Thanks, KB> Have you tried gls()? > > > ----------------------------------------------------------------------------> ir. Thierry Onkelinx > Instituut voor natuur- en bosonderzoek / Research Institute for Natureand Forest> Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,methodology and quality assurance> Gaverstraat 4 > 9500 Geraardsbergen > Belgium > tel. + 32 54/436 185 > Thierry.Onkelinx at inbo.be > www.inbo.be > > Do not put your faith in what statistics say until you have carefullyconsidered what they do not say. ~William W. Watt> A statistical analysis, properly conducted, is a delicate dissection ofuncertainties, a surgery of suppositions. ~M.J.Moroney> > -----Oorspronkelijk bericht----- > Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]Namens Konrad BLOCHER> Verzonden: woensdag 6 februari 2008 12:12 > Aan: r-help at r-project.org > Onderwerp: [R] Multivariate Maximum Likelihood Estimation > > Hi, > > I am trying to perform Maximum Likelihood estimation of a Multivariatemodel (2 independent variables + intercept) with autocorrelated errors of> 1st order (ar(1)). > > Does R have a function for that? I could only find an univariate option(ar.mle function) and when writing my own I find that it is pretty memory-consuming (and sometimes wrong) so there must be a better way.> > Thanks, > > KB > > ______________________________________________ > R-help at 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-guide.html > and provide commented, minimal, self-contained, reproducible code. >
Possibly Parallel Threads
- Full Information Maximum Likelihood estimation method for multivariate sample selection problem
- time series regression
- modifying arrays within functions
- accessing log likelihood of poison model
- COXPH: how to get the score test and likelihood ratio test for a specific variable in a multivariate Coxph ?