answers to regress
- To: mathgroup at christensen.cybernetics.net
- Subject: [mg237] answers to regress
- From: calman at aplcomm.jhuapl.edu (Jack Calman STH x4398)
- Date: Mon, 28 Nov 1994 09:44:38 -0500
Here are two answers I got after posting the following questions, once to MathGroup, and once to WRI: Two questions about Statistics`LinearRegression`Regress: Data can be fit by, for example, Regress[data, {1, x, x^2}, {x}, OutputList -> {ParameterTable, ConfidenceIntervalTable}, OutputControl -> NoPrint] which fits the data to a second degree polynomial, and gives many of the error statistics of interest. BUT: 1) The output comes in the form of several tables, and looks like: ParameterTable -> ....(table of numbers and text)... ConfidenceIntervalTable -> ...(another table of numbers and text)... Here is the first question: How can the various numbers in the tables on the right side be extracted for use as variables, for example as inputs to Graphics`Graphics`ErrorListPlot ? 2) How can one control the word wrap or line width in the ParameterTable or other tabular output. The line breaks or wraps while there is still plenty of room on the screen (even if I reformat the cell to use a smaller font), and the table is then very hard to read ? Thank you MathGroupers. This is my first posting. Jack_Calman at jhuapl.edu Applied Physics Laboratory The Johns Hopkins University Laurel, MD ------------------------------------------------------------------ I would like the output of Regress to be in a smaller font and a larger line width so that the table it produces fits and looks nice on the page. I tried changing the output cell's font and word wrap parameters but they did not change anything. Then I tried FontFormat[regressoutput, {"Courier", 8}], but that didn't work either. I suspect there is some option possible in Regress. Can you tell me how to do it? Thank you very much, Jack_Calman at jhuapl.edu ------------------------------------------------------------ From forest at ananke.mit.edu Wed Nov 2 11:16 EST 1994 To: calman at aplcomm.jhuapl.edu (Jack Calman STH x4398) Subject: Re: Regress Content-Type: text Content-Length: 613 In answer to one of your questions, here is one way to use the output parameters. output = Regress[data, {1, x, x^2}, {x}, OutputList -> {ParameterTable, ConfidenceIntervalTable}, OutputControl -> NoPrint] ]; paramtable = ParameterTable /. output; cit = ConfidenceIntervalTable /. output; I can't help much on the other. The only thing I can think of is setting the page width differently using the rulers or through PageLayout. If you are using a notebook interface, this should be easy. Else??? Good luck. Chris Forest forest at ananke.mit.edu Center for Meteorology and Physical Oceanography, MIT. ---------------------------------------------------------- Answer from WRI: Thank you for your email. I launched a copy of Mathematica V2.2.2 for Windows and tried a sample regression. I got an answer much like I expected to. I then selected the output cell, and pulled down the Font item from the Style menu. I changed the font to 8 pt. and it worked just fine. The output from Regress was formatted to a smaller size. If you have further questions, please write back with a detailed description of what you have tried so far. K.J. Paradise Technical Support