### Basic Examples

Basic Examples

Find a fit ignoring a single outlier:

[{1,2,3,4,5,6,100},{1,x},x,1]

In[]:=

9.68575×10+1.x

-8

Out[]=

Fit

Fit[{1,2,3,4,5,6,100},{1,x},x]

In[]:=

-26.5714+10.9643x

Out[]=

In this case is broadly equivalent to:

TrimmedLinearFit

Fit[{1,2,3,4,5,6},{1,x},x]

In[]:=

1.08779×10+1.x

-15

Out[]=

### Scope

Scope

The amount of trimming can be specified as a proportion of the data, for example discarding 30% of the data:

[{1,2,3,4,5,6,100},{1,x},x,Scaled[0.3]]

In[]:=

1.06603×10+1.x

-8

Out[]=

Data and models can be multi-dimensional:

[{{1,1,1},{1,2,2},{2,1,2},{2,2,100}},{1,x,y},{x,y},1]

In[]:=

-1.+1.x+1.y

Out[]=