VAR Estimation Results to Latex by stargazer











up vote
1
down vote

favorite
1












I am trying to use the package Stargazer to "export" my estimation results into LaTeX code. I have read the stargazer manual and even tried to export selected rows without any luck. There are a lot of output for the package to handle.



I create an object



Summary <- summary(VAR(Vektorer, p=1, type="const", ic = c("AIC", "HQ", "SC", "FPE")))


Then, I use the stargazer package



stargazer(Summary)


and get the following error:



Error: Unrecognized object type.



Anyone familiar with this object type and how to export it into LaTeX code? I guess there re other packages which are more suitable for the object type. Unfortunately I am not very familiar with exporting R outputs into LaTeX.










share|improve this question


























    up vote
    1
    down vote

    favorite
    1












    I am trying to use the package Stargazer to "export" my estimation results into LaTeX code. I have read the stargazer manual and even tried to export selected rows without any luck. There are a lot of output for the package to handle.



    I create an object



    Summary <- summary(VAR(Vektorer, p=1, type="const", ic = c("AIC", "HQ", "SC", "FPE")))


    Then, I use the stargazer package



    stargazer(Summary)


    and get the following error:



    Error: Unrecognized object type.



    Anyone familiar with this object type and how to export it into LaTeX code? I guess there re other packages which are more suitable for the object type. Unfortunately I am not very familiar with exporting R outputs into LaTeX.










    share|improve this question
























      up vote
      1
      down vote

      favorite
      1









      up vote
      1
      down vote

      favorite
      1






      1





      I am trying to use the package Stargazer to "export" my estimation results into LaTeX code. I have read the stargazer manual and even tried to export selected rows without any luck. There are a lot of output for the package to handle.



      I create an object



      Summary <- summary(VAR(Vektorer, p=1, type="const", ic = c("AIC", "HQ", "SC", "FPE")))


      Then, I use the stargazer package



      stargazer(Summary)


      and get the following error:



      Error: Unrecognized object type.



      Anyone familiar with this object type and how to export it into LaTeX code? I guess there re other packages which are more suitable for the object type. Unfortunately I am not very familiar with exporting R outputs into LaTeX.










      share|improve this question













      I am trying to use the package Stargazer to "export" my estimation results into LaTeX code. I have read the stargazer manual and even tried to export selected rows without any luck. There are a lot of output for the package to handle.



      I create an object



      Summary <- summary(VAR(Vektorer, p=1, type="const", ic = c("AIC", "HQ", "SC", "FPE")))


      Then, I use the stargazer package



      stargazer(Summary)


      and get the following error:



      Error: Unrecognized object type.



      Anyone familiar with this object type and how to export it into LaTeX code? I guess there re other packages which are more suitable for the object type. Unfortunately I am not very familiar with exporting R outputs into LaTeX.







      r latex stargazer






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Dec 3 '15 at 18:39









      laviola

      62




      62
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote













          First, I assume that you are using the VAR function from ´vars´. If so, do you really want to extract all the information at once from the summary function? Instead you could chose which information to present by Summary$varresult$´variable´.



          Instead of using stargazer, I used xtable to produce the LaTeX code



          library(vars)
          library(xtable)

          X <- cbind("A"=rnorm(100, 50), "B"=rnorm(100, 600, 50))

          model <- VAR(X, p=1, type = "const", ic = c("AIC", "HQ", "SC", "FPE"))
          tmp <- summary(model)

          xtable(tmp$varresult$A)
          xtable(tmp$varresult$B)


          Also note all other possible output from tmp$.






          share|improve this answer




























            up vote
            1
            down vote













            The problem is clear in the error message; stargazer does not understand the type of object you are passing it.



            One option is to pass the underlying lm objects, which stargazer does know what to do with. Something along the lines of:



            X <- cbind("A"=rnorm(100, 50), "B"=rnorm(100, 600, 50))
            model <- VAR(X, p=1, type = "const", ic = c("AIC", "HQ", "SC", "FPE"))
            stargazer::stargazer(model$varresult$A, model$varresult$B)





            share|improve this answer





















              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














               

              draft saved


              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f34073708%2fvar-estimation-results-to-latex-by-stargazer%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              2
              down vote













              First, I assume that you are using the VAR function from ´vars´. If so, do you really want to extract all the information at once from the summary function? Instead you could chose which information to present by Summary$varresult$´variable´.



              Instead of using stargazer, I used xtable to produce the LaTeX code



              library(vars)
              library(xtable)

              X <- cbind("A"=rnorm(100, 50), "B"=rnorm(100, 600, 50))

              model <- VAR(X, p=1, type = "const", ic = c("AIC", "HQ", "SC", "FPE"))
              tmp <- summary(model)

              xtable(tmp$varresult$A)
              xtable(tmp$varresult$B)


              Also note all other possible output from tmp$.






              share|improve this answer

























                up vote
                2
                down vote













                First, I assume that you are using the VAR function from ´vars´. If so, do you really want to extract all the information at once from the summary function? Instead you could chose which information to present by Summary$varresult$´variable´.



                Instead of using stargazer, I used xtable to produce the LaTeX code



                library(vars)
                library(xtable)

                X <- cbind("A"=rnorm(100, 50), "B"=rnorm(100, 600, 50))

                model <- VAR(X, p=1, type = "const", ic = c("AIC", "HQ", "SC", "FPE"))
                tmp <- summary(model)

                xtable(tmp$varresult$A)
                xtable(tmp$varresult$B)


                Also note all other possible output from tmp$.






                share|improve this answer























                  up vote
                  2
                  down vote










                  up vote
                  2
                  down vote









                  First, I assume that you are using the VAR function from ´vars´. If so, do you really want to extract all the information at once from the summary function? Instead you could chose which information to present by Summary$varresult$´variable´.



                  Instead of using stargazer, I used xtable to produce the LaTeX code



                  library(vars)
                  library(xtable)

                  X <- cbind("A"=rnorm(100, 50), "B"=rnorm(100, 600, 50))

                  model <- VAR(X, p=1, type = "const", ic = c("AIC", "HQ", "SC", "FPE"))
                  tmp <- summary(model)

                  xtable(tmp$varresult$A)
                  xtable(tmp$varresult$B)


                  Also note all other possible output from tmp$.






                  share|improve this answer












                  First, I assume that you are using the VAR function from ´vars´. If so, do you really want to extract all the information at once from the summary function? Instead you could chose which information to present by Summary$varresult$´variable´.



                  Instead of using stargazer, I used xtable to produce the LaTeX code



                  library(vars)
                  library(xtable)

                  X <- cbind("A"=rnorm(100, 50), "B"=rnorm(100, 600, 50))

                  model <- VAR(X, p=1, type = "const", ic = c("AIC", "HQ", "SC", "FPE"))
                  tmp <- summary(model)

                  xtable(tmp$varresult$A)
                  xtable(tmp$varresult$B)


                  Also note all other possible output from tmp$.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 3 '15 at 22:58









                  Pierre

                  265210




                  265210
























                      up vote
                      1
                      down vote













                      The problem is clear in the error message; stargazer does not understand the type of object you are passing it.



                      One option is to pass the underlying lm objects, which stargazer does know what to do with. Something along the lines of:



                      X <- cbind("A"=rnorm(100, 50), "B"=rnorm(100, 600, 50))
                      model <- VAR(X, p=1, type = "const", ic = c("AIC", "HQ", "SC", "FPE"))
                      stargazer::stargazer(model$varresult$A, model$varresult$B)





                      share|improve this answer

























                        up vote
                        1
                        down vote













                        The problem is clear in the error message; stargazer does not understand the type of object you are passing it.



                        One option is to pass the underlying lm objects, which stargazer does know what to do with. Something along the lines of:



                        X <- cbind("A"=rnorm(100, 50), "B"=rnorm(100, 600, 50))
                        model <- VAR(X, p=1, type = "const", ic = c("AIC", "HQ", "SC", "FPE"))
                        stargazer::stargazer(model$varresult$A, model$varresult$B)





                        share|improve this answer























                          up vote
                          1
                          down vote










                          up vote
                          1
                          down vote









                          The problem is clear in the error message; stargazer does not understand the type of object you are passing it.



                          One option is to pass the underlying lm objects, which stargazer does know what to do with. Something along the lines of:



                          X <- cbind("A"=rnorm(100, 50), "B"=rnorm(100, 600, 50))
                          model <- VAR(X, p=1, type = "const", ic = c("AIC", "HQ", "SC", "FPE"))
                          stargazer::stargazer(model$varresult$A, model$varresult$B)





                          share|improve this answer












                          The problem is clear in the error message; stargazer does not understand the type of object you are passing it.



                          One option is to pass the underlying lm objects, which stargazer does know what to do with. Something along the lines of:



                          X <- cbind("A"=rnorm(100, 50), "B"=rnorm(100, 600, 50))
                          model <- VAR(X, p=1, type = "const", ic = c("AIC", "HQ", "SC", "FPE"))
                          stargazer::stargazer(model$varresult$A, model$varresult$B)






                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Aug 29 '17 at 8:35









                          t-student

                          19510




                          19510






























                               

                              draft saved


                              draft discarded



















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f34073708%2fvar-estimation-results-to-latex-by-stargazer%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Full-time equivalent

                              さくらももこ

                              13 indicted, 8 arrested in Calif. drug cartel investigation