for relating the number of observations versus the number of independent variables in the model. One method conjectured by Good and Hardin is , where is the sample size, is the number of independent variables and is the number of observations needed to reach the desired precision if the model had only one independent variable. For example, a researcher is building a linear regression model using a dataset that contains 1000 patients (). If the researcher decides that five observations are needed to precisely define a straight line (), then the maximum number of independent variables the model can support is 4, because Other methods Although the parameters of a regression model are usually estimated using the method of least squares, other methods which have been used include: Bayesian methods, e.g. Bayesian linear regression Percentage regression, for situations where reducing percentage errors is deemed more appropriate. Least absolute deviations, which is more robust in the presence of outliers, leading to quantile regression Nonparametric regression, requires a large number of observations and is computationally intensive Scenario optimization, leading to interval predictor models Distance metric learning, which is learned by the search of a meaningful distance metric in a given input space. Software All major statistical software packages perform least squares regression analysis and inference. Simple linear regression and multiple regression using least squares can be done in some spreadsheet applications and on some calculators. While many statistical software packages can perform various types of nonparametric and robust regression, these methods are less standardized. Different software packages implement different methods, and a method with a given name may be implemented differently in different packages. Specialized regression software has been developed for use in fields such as survey analysis and neuroimaging. See also Anscombe's quartet Curve fitting Estimation theory Forecasting Fraction of variance unexplained Function approximation Generalized linear model Kriging (a linear least squares estimation algorithm) Local regression Modifiable areal unit problem Multivariate adaptive regression splines Multivariate normal distribution Pearson correlation coefficient Quasi-variance Prediction interval Regression validation Robust regression Segmented regression Signal processing Stepwise regression Taxicab geometry Trend estimation References Further reading William H. Kruskal and Judith M. Tanur, ed. (1978), "Linear Hypotheses," International Encyclopedia of Statistics. Free Press, v. 1, Evan J. Williams, "I. Regression," pp. 523–41. Julian C. Stanley, "II. Analysis of Variance," pp. 541–554. Lindley, D.V. (1987). "Regression and correlation analysis," New Palgrave: A Dictionary of Economics, v. 4, pp.