Hi, guess my problem has simple solution. I want to extract ONLY Std. Errors of Max. Lik. estimates (my_fit<-mle(object,...)), the same as I can do with estimates by: x<-as. matrix(coef(my_fit)). I could not find any function similar to 'coef(my_fit)', which extracts only Standard Errors. So far all I can do is to type: summary(my_fit) and then get the whole output (with Standard Eroros involved). thank you in advance and best wishes, robert -- View this message in context: http://www.nabble.com/standard-errors-tp15734141p15734141.html Sent from the R help mailing list archive at Nabble.com.
Try this: coef(summary(fit))[,2] On 28/02/2008, threshold <r.kozarski at gmail.com> wrote:> > Hi, guess my problem has simple solution. > I want to extract ONLY Std. Errors of Max. Lik. estimates > (my_fit<-mle(object,...)), the same as I can do with estimates by: > x<-as. matrix(coef(my_fit)). > I could not find any function similar to 'coef(my_fit)', which extracts only > Standard Errors. So far all I can do is to type: summary(my_fit) and then > get the whole output (with Standard Eroros involved). > > thank you in advance and best wishes, robert > > -- > View this message in context: http://www.nabble.com/standard-errors-tp15734141p15734141.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. >-- Henrique Dallazuanna Curitiba-Paran?-Brasil 25? 25' 40" S 49? 16' 22" O
On Thu, 28 Feb 2008, threshold wrote:> Hi, guess my problem has simple solution. > I want to extract ONLY Std. Errors of Max. Lik. estimates > (my_fit<-mle(object,...)), the same as I can do with estimates by: > x<-as. matrix(coef(my_fit)). > I could not find any function similar to 'coef(my_fit)', which extracts only > Standard Errors. So far all I can do is to type: summary(my_fit) and then > get the whole output (with Standard Eroros involved).vcov() is the extractor function that gets you the variance-covariance matrix. Hence, sqrt(diag(vcov(obj))) gets you the standard errors. Z> thank you in advance and best wishes, robert > > -- > View this message in context: http://www.nabble.com/standard-errors-tp15734141p15734141.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > 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. > >
threshold wrote:> Hi, guess my problem has simple solution. > I want to extract ONLY Std. Errors of Max. Lik. estimates > (my_fit<-mle(object,...)), the same as I can do with estimates by: > x<-as. matrix(coef(my_fit)). > I could not find any function similar to 'coef(my_fit)', which extracts only > Standard Errors. So far all I can do is to type: summary(my_fit) and then > get the whole output (with Standard Eroros involved). > > thank you in advance and best wishes, robert > >Use coef(summary(my_fit)). Generally summary() methods don't just print results, they return them in a usable form too. Duncan Murdoch
vcov(my_fit) should get you the whole variance matrix, so sqrt(diag(vcov(my_fit))) should get you ONLY the standard errors. -----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of threshold Sent: Thursday, 28 February 2008 9:06 PM To: r-help at r-project.org Subject: [R] standard errors Hi, guess my problem has simple solution. I want to extract ONLY Std. Errors of Max. Lik. estimates (my_fit<-mle(object,...)), the same as I can do with estimates by: x<-as. matrix(coef(my_fit)). I could not find any function similar to 'coef(my_fit)', which extracts only Standard Errors. So far all I can do is to type: summary(my_fit) and then get the whole output (with Standard Eroros involved). thank you in advance and best wishes, robert -- View this message in context: http://www.nabble.com/standard-errors-tp15734141p15734141.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.