Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

After I input the following:

data = Table[{3 + i + RandomReal[{-3, 7}], 
i + RandomReal[{-2, 5}]}, {i, 1, 20}];

model = LinearModelFit[data, x, x]

I got something weird:

(*   FittedModel[-1.65238+<<19>>x]     *)

Does anyone know what <<19>>x means?

share|improve this question
    
Try model[x] ;-) –  chris Nov 25 '12 at 17:44
    
I followed the tutorial precisely but the tutorial displayed the result that is understandable: FittedModel[-1.65238+0.694915x] How can I tweak the preference to get the same result? –  Lei Chen Nov 25 '12 at 18:07
    
it does for me (i.stack.imgur.com/eLOqb.png); please try from a new session? –  chris Nov 25 '12 at 18:13
    
@chris Perhaps something with a precision setting. data = SetPrecision[ Table[{3 + i + RandomReal[{-3, 7}], i + RandomReal[{-2, 5}]}, {i, 1, 20}], 200]; gets a similar result. –  Sjoerd C. de Vries Nov 25 '12 at 18:59
add comment

2 Answers 2

<<19>> or Skeleton[19] means that some output (here 19 elements) is omitted. See the ShortAndShallowOutput tutorial in the Documentation Center for more information.

share|improve this answer
    
How can I tweak the input to get something understandable? –  Lei Chen Nov 25 '12 at 17:58
2  
@LeiChen It is important to realize that the output that you see is only a symbolical representation of the actual output. What you get returned is an object which knows several methods as Chris showed. How the object is depicted on your screen is totally irrelevant. It could have been a pink elephant, that doesn't matter, it's only decoration. If you're after the fit itself you can use model["BestFit"] –  Sjoerd C. de Vries Nov 25 '12 at 19:17
    
@Sjoerd C. de Vries Thanks! –  Lei Chen Nov 25 '12 at 19:43
add comment

LinearModelFit returns a full statistical information set.

For instance

   model[x] 

would return

   (* 0.778634 x+1.13751  *)

or

   model["ANOVATable"]

Mathematica graphics

More generally, try

   model /@ model["Properties"]

Mathematica graphics

share|improve this answer
1  
I think the question really was: "Does anyone know what <<19>>x means" :) –  rm -rf Nov 25 '12 at 17:56
2  
@rm-rf probably, but if the OP is a real beginner he/she might be after understanding Mathematica's cryptic answer ;-) –  chris Nov 25 '12 at 17:57
    
Oh, I certainly agree (and going by their comment under ssch's answer, they're clueless). I thought I'd just point out, just in case you hadn't seen it :) –  rm -rf Nov 25 '12 at 18:56
5  
<< +1 >> $\phantom{}$ –  belisarius Nov 25 '12 at 19:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.