Fitted line plot through the origin

This macro creates a fitted line plot that goes through the origin.

Download the Macro

Be sure that Minitab knows where to find your downloaded macro. Choose Tools > Options > General. Under Macro location browse to the location where you save macro files.

Important

If you use an older web browser, when you click the Download button, the file may open in Quicktime, which shares the .mac file extension with Minitab macros. To save the macro, right-click the Download button and choose Save target as.

Required Inputs

  • One column of dependent dta (Y)
  • One column of independent data (X)

Optional Inputs

CONF K
The default confidence interval is 95%, but you can change the default by using the subcommand CONF followed by the interval you want to use (1-99).
CI
Use to show the 95% confidence bands.
PI
Use to show the 95% prediction bands.
REDIDS C
Use to store the residuals of the regression through the origin in the specified column.
Note

It is strongly suggested that the residuals from any regression model be examined for randomness and normality.

TITLE “text”
Use to specify a custom title for the graph.

Running the Macro

Suppose your dependent variable, Y, is in C1 and your independent variable, X, is in C2. You want to change the confidence level to 90% and store the residuals in column C3. To run the macro choose Edit > Command Line Editor and type:
%ORIGIN C1 C2;
CONF 90; 
RESIDS C3.

Click Submit Commands.

More Information

You can create this graph manually with Minitab commands.

  1. Choose Graph > Scatterplot > With Regression.
  2. Under Y variables enter C2. Under X variables enter C1.
  3. Click Data View, then click the Regression tab.
  4. Uncheck Fit intercept. Click OK in each dialog box.
Note

Because it is difficult to interpret the R-sq when the constant is omitted, the R-sq value is not printed in the regression output.

By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy