s-news
[Top] [All Lists]

[Summary] Exporting/generate reports of summary output of regression

To: s-news@lists.biostat.wustl.edu
Subject: [Summary] Exporting/generate reports of summary output of regression
From: Lim Weiyang <aficionado82@yahoo.com.sg>
Date: Mon, 13 Oct 2008 02:24:16 +0800 (SGT)
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.sg; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=OG+QJKIh603xXet6YJnloByHPg3nJKcUvpQFG310xUydRSmHLHXXFMxiJHve2qSGzoBlzWif+q19xrH/JEXE/5jzBc4QdgVNhifuP1lv0CPUGFbn8W/ubxsyufE4hUweDdMNjCLzXVRE3nOhzY9K+JVG2I9TeBYI9MNjX8w1lEQ=;
Reply-to: aficionado82@yahoo.com.sg
Hi,
 
I posted a question last week on how to export results of summary output of regression. Thanks to Harry Southworth, Chris Barker, Terry Therneau for their responses! Below are the question and responses. In addition, I realized that the scan() function may be useful as well.
 
 
 
Original question
 
Dear S-users,
 
I wonder if there is any way I can export the output generated (or place them in an easily readable form) when performing a regression or regression diagnostics with S functions like summary(), heteroTest, normalTest etc together into say a pdf file/reports since this will make for easier reading as a whole.
 
It will be even better if output from multiple regressions can be exported out into a single document using a function like pdf() as I may need to do many regressions and see the output as a whole.
 
Many thanks for your help!
 
 
From Harry Southworth
 
?createXMLFile
?xml2html
?xml2pdf
 
The XSL stylesheets that come with S-PLUS are a bit ropey, so you might need to write your own. You'd also have to do a bit more work to embed graphs.
 
hth
Harry
 
From Chris Barker
 
Depends in part on what you mean by easier reading. Some people use TeX  http://en.wikipedia.org/wiki/TeX
 
  Chris Barker, Ph.D.
Consulting Statistician
 
From Terry Therneau
 
You question almost exactly describes the functionality of the Sweave and
odfweave packages.  Look them up on google.


    Terry Therneau
 
Alternate method
 
# Write the output to the file given
    sink("C:\\testLM.txt")

    # Call regressions
    test.lm.1 <- lm(Fuel~., data="">    test.lm.1
    summary(test.lm.1)

    test.lm.2 <- lm(Fuel~Mileage+Type, data="">    test.lm.2
    summary(test.lm.2)

    # Return the output back to the program
    sink()

Best Regards,

Weiyang



Get your new Email address!
Grab the Email name you've always wanted before someone else does!
<Prev in Thread] Current Thread [Next in Thread>
  • [Summary] Exporting/generate reports of summary output of regression, Lim Weiyang <=