               NEWS NLREG has been selected as the "Editor"s Pick" by SoftSeek. NLREG is in use at hundreds of universities, laboratories, and government agencies around the world (over 20 countries). For a list of a few organizations using NLREG click here. If you have categorical variables, you may want to use a Decision Tree to model your data. Check out the DTREG Decision Tree Builder. You also should check out the News Rover program that automatically scans Usenet newsgroups, downloads messages of interest to you, decodes binary file attachments, reconstructs files split across multiple messages, and eliminates spam and duplicate files.  ## Magnet Deflection Example

This example fits a function involving an arc tangent and a variable to the third power. This is an interesting physics problem. If a magnet is placed due east of a compass, the deflection of the compass needle from north is equal to the arc tangent of the ratio of the strength of the magnet's field relative to the earth's magnetic field. The strength of the magnet's field at the compass is inversely proportional to the cube of the distance from the magnet to the compass. Thus, the function relating these terms is

``` Deflection = atan(Strength / Distance ^ 3)
```
The deg() function converts an angle in radians to degrees. In the example, Deflection and Distance are the variables, and the value of the Strength parameter is determined.
```Title "Deflection of compass due to magnet east of it";
Variable Distance;              // Distance of magnet from compass (inches)
Variable Deflection;            // Deflection in degrees
Parameter Strength;             // Strength of magnet
Function Deflection = atan(Strength / Distance ^ 3);
Plot xlabel="Distance from compass (cm)",ylabel="Deflection of compass";
Tolerance 1E-7;                 // Specify convergence criterion
Data;
[ data goes here ]
``` 