ProbitModelFit[{{x1,y1},{x2,y2},…},{f1,f2,…},x]
constructs a binomial probit regression model of the form
that fits the yi for each xi.
ProbitModelFit[data,{f1,f2,…},{x1,x2,…}]
constructs a binomial probit regression model of the form
where the fi depend on the variables xk.
ProbitModelFit[{m,v}]
constructs a binomial probit regression model from the design matrix m and response vector v.
ProbitModelFit
ProbitModelFit[{{x1,y1},{x2,y2},…},{f1,f2,…},x]
constructs a binomial probit regression model of the form
that fits the yi for each xi.
ProbitModelFit[data,{f1,f2,…},{x1,x2,…}]
constructs a binomial probit regression model of the form
where the fi depend on the variables xk.
ProbitModelFit[{m,v}]
constructs a binomial probit regression model from the design matrix m and response vector v.
Details and Options
- ProbitModelFit attempts to model the data using a linear combination of basis functions composed with the inverse of the probit function (
). - LogitModelFit is typically used in classification to model probability values.
- ProbitModelFit produces a generalized linear model of the form
under the assumption that the original
are independent realizations of Bernoulli trials with probabilities
. - The function
is the CDF of the standard NormalDistribution. - ProbitModelFit returns a symbolic FittedModel object to represent the probit model it constructs. The properties and diagnostics of the model can be obtained from model["property"].
- The value of the best-fit function from ProbitModelFit at a particular point x1, … can be found from model[x1,…].
- Possible forms of data are:
-
{y1,y2,…} equivalent to the form {{1,y1},{2,y2},…} {{x11,x12,…,y1},…} a list of independent values xij and the responses yi {{x11,x12,…}y1,…} a list of rules between input values and response {{x11,x12,…},…}{y1,y2,…} a rule between a list of input values and responses {{x11,…,y1,…},…}n fit the n
column of a matrixTabular[…]name fit the column name in a tabular object - With multivariate data such as
, the number of coordinates xi1, xi2, … should equal the number of variables xi. - The yi are probabilities between 0 and 1.
- Additionally, data can be specified using a design matrix without specifying functions and variables:
-
{m,v} a design matrix m and response vector v - In ProbitModelFit[{m,v}], the design matrix m is formed from the values of basis functions fi at data points in the form {{f1,f2,…},{f1,f2,…},…}. The response vector v is the list of responses {y1,y2,…}.
- For a design matrix m and response vector v, the model is
where
is the vector of parameters to be estimated. - When a design matrix is used, the basis functions fi can be specified using the form ProbitModelFit[{m,v},{f1,f2,…}].
- ProbitModelFit is equivalent to GeneralizedLinearModelFit with ExponentialFamily->"Binomial" and LinkFunction->"ProbitLink".
- ProbitModelFit takes the same options as GeneralizedLinearModelFit, with the exception of ExponentialFamily and LinkFunction.
Examples
open all close allBasic Examples (1)
data = {{1, 0}, {2, 0}, {2, 0}, {2, 1}, {2, 0}, {3, 0}, {3, 0}, {3, 0}, {3, 1}, {3, 1}, {3, 1}, {4, 1}, {4, 1}, {5, 0}, {6, 1}, {7, 1}};Fit a probit model to the data:
probit = ProbitModelFit[data, x, x]Evaluate the model at a point:
probit[1.5]Plot the data points and the models:
Show[ListPlot[data, PlotStyle -> PointSize[Medium]], Plot[probit[x], {x, 0, 8}]]Scope (13)
Data (6)
Fit data with success probability responses, assuming increasing integer-independent values:
ProbitModelFit[{1 / 3, 2 / 3, 5 / 5}, x, x]//NormalProbitModelFit[{{1, 1 / 3}, {2, 2 / 3}, {3, 5 / 5}}, x, x]//NormalWeight by the number of observations for each predictor value:
ProbitModelFit[{{1, 1 / 3}, {2, 2 / 3}, {3, 5 / 5}}, x, x, Weights -> {3, 6, 5}]//NormalThis gives the same best fit function as success failure data:
sfdata = {{1, 0}, {1, 1}, {1, 0}, {2, 0}, {2, 0}, {2, 1}, {2, 1}, {2, 1}, {2, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}, {3, 1}};
GroupBy[sfdata, First -> Last]ProbitModelFit[sfdata, x, x] //NormalProbitModelFit[{1 -> 1 / 3, 2 -> 2 / 3, 3 -> 3 / 3}, x, x]Fit a rule of input values and responses:
ProbitModelFit[{1, 2, 3} -> {1 / 3, 2 / 3, 3 / 3}, x, x]Specify a column as the response:
data = {...};fit = ProbitModelFit[data -> 1, {1, x, y}, {x, y}]Show[
Plot3D[fit[x, y], {x, -5, 5}, {y, -5, 5}],
ListPointPlot3D[data[[All, {2, 3, 1}]]],
PlotRange -> All
]Fit a model given a design matrix and response vector:
dm = {{1, 1}, {1, 2}, {1, 3}, {1, 4}};
resp = {0, 1, 0, 1};ProbitModelFit[{dm, resp}]Normal[%]Fit the model referring to the basis functions as
and
:
ProbitModelFit[{dm, resp}, {x, y}]//NormalObtain a list of available properties:
probit = ProbitModelFit[RandomReal[1, 10], x, x]probit["Properties"]Properties (7)
Data & Fitted Functions (1)
data = Join[RandomReal[10, {10, 2}], Transpose[{RandomReal[1, 10]}], 2];probit = ProbitModelFit[data, {x, y}, {x, y}]probit["Data"]{fit = probit["BestFit"], Show[Plot3D[fit, {x, 0, 10}, {y, 0, 10}], Graphics3D[{PointSize[0.025], Point[probit["Data"]]}]]}Obtain the fitted function as a pure function:
probit["Function"]Get the design matrix and response vector for the fitting:
MatrixForm /@ probit[{"DesignMatrix", "Response"}]Residuals (1)
data = Join[RandomReal[10, {100, 2}], Transpose[{RandomReal[1, 100]}], 2];probit = ProbitModelFit[data, {x, y}, {x, y}]{fr, ar, spr} = probit[{"FitResiduals", "StandardizedPearsonResiduals", "AnscombeResiduals"}];ListPlot[fr]Visualize Anscombe residuals and standardized Pearson residuals in stem plots:
Map[ListPlot[#, Filling -> 0]&, {ar, spr}]//RowDispersion and Deviances (1)
Fit a probit model to some data:
SeedRandom[1];
data = Flatten[Table[{x, y, 1 / (1 + Exp[.2 + .3x + .1y + RandomReal[{-1, 1}]])}, {x, RandomReal[5, 10]}, {y, RandomReal[5, 10]}], 1];probit = ProbitModelFit[data, {x, y}, {x, y}]The estimated dispersion is 1 by default:
probit["EstimatedDispersion"]Use Pearson's
as the dispersion estimator instead:
probit["EstimatedDispersion", DispersionEstimatorFunction -> "PearsonChiSquare"]Plot the deviances for each point:
ListPlot[probit["Deviances"], Filling -> 0]Obtain the analysis of deviance table:
probit["DevianceData"]Get the residual deviances from the table:
probit["DevianceData"][All, "ResidualDeviance"]//NormalParameter Estimation Diagnostics (1)
Obtain a formatted table of parameter information:
SeedRandom[1];
data = Table[{i, RandomInteger[BinomialDistribution[20, .05 + i / 30 + Sin[i] / 10]] / 20}, {i, 1, 20, .2}];
probit = ProbitModelFit[data, {x, Sin[x], Cos[x]}, x];probit["ParameterEstimates"]Extract the column of
-statistic values:
probit["ParameterEstimates"][All, "ZStatistic"]//NormalInfluence Measures (1)
Fit some data containing extreme values to a probit model:
data = Table[{i, 1 / 2(1 + Erf[(2 + 4i + RandomReal[]) / Sqrt[2]])}, {i, RandomReal[{1, 10}, 20]}];
data[[{3, 8}, -1]] = 1 - data[[{3, 8}, -1]];
probit = ProbitModelFit[data, x, x]Check Cook distances to identify highly influential points:
ListPlot[probit["CookDistances"], PlotRange -> {0, All}, Filling -> 0]Check the diagonal elements of the hat matrix to assess influence of points on the fitting:
ListPlot[probit["HatDiagonal"], PlotRange -> {0, All}, Filling -> 0]Prediction Values (1)
data = Flatten[Table[{x, y, 1 / (1 + Exp[.3x - .5y + RandomReal[{-1, 1}]])}, {x, RandomReal[5, 3]}, {y, RandomReal[5, 3]}], 1];probit = ProbitModelFit[data, {x, y}, {x, y}]Plot the predicted values against the observed values:
ListPlot[Transpose[probit[{"Response", "PredictedResponse"}]], FrameLabel -> {"observed", "predicted"}, Frame -> True, Axes -> False]Goodness-of-Fit Measures (1)
Obtain a table of goodness-of-fit measures for a probit model:
data = Flatten[Table[{i, j, RandomReal[], 1 / 2(1 + Erf[(.2 + .3i + j + RandomReal[]) / Sqrt[2]])}, {i, RandomReal[1, 5]}, {j, RandomReal[1, 5]}], 1];probit = ProbitModelFit[data, {x, y, z}, {x, y, z}]Grid[Transpose[{#, probit[#]}&[{"AIC", "BIC", "LikelihoodRatioIndex", "PearsonChiSquare"}]], Alignment -> Left]Compute goodness-of-fit measures for all subsets of predictor variables:
sub = Table[Join[{i}, ProbitModelFit[data, i, {x, y, z}][{"AIC", "BIC", "LikelihoodRatioIndex", "PearsonChiSquare"}]], {i, Subsets[{x, y, z}]}]Grid[Join[{{"Model", "AIC", "BIC", "LikelihoodRatioIndex", "PearsonChiSquare"}}, SortBy[sub, -#[[2]]&]]]Generalizations & Extensions (1)
Perform other mathematical operations on the functional form of the model:
probit = ProbitModelFit[Table[{i, RandomReal[{i - 1, i}] / 10}, {i, 10}], x, x]Integrate symbolically and numerically:
Integrate[probit[x], x]NIntegrate[probit[x], {x, 1, 5}]Find a predictor value that gives a particular value for the model:
FindRoot[probit[x] == .5, {x, 5}]Options (8)
ConfidenceLevel (1)
The default gives 95% confidence intervals:
data = {{0, 1}, {1, 0}, {3, 1}, {5, 0}};probit = ProbitModelFit[data, x, x]probit["ParameterEstimates"][All, "ConfidenceInterval"]//Normalprobit = ProbitModelFit[data, x, x, ConfidenceLevel -> .99]probit["ParameterEstimates"][All, "ConfidenceInterval"]//NormalSet the level to 90% within FittedModel:
probit["ParameterEstimates", ConfidenceLevel -> .9][All, "ConfidenceInterval"]//NormalCovarianceEstimatorFunction (1)
data = {{0, 1}, {1, 0}, {3, 1}, {5, 0}};probit = ProbitModelFit[data, x, x]Compute the covariance matrix using the expected information matrix:
probit["CovarianceMatrix"]Use the observed information matrix instead:
probit["CovarianceMatrix", CovarianceEstimatorFunction -> "ObservedInformation"]DispersionEstimatorFunction (1)
data = {{1, 0}, {1, 1}, {1, 1}, {2, 0}, {2, 0}, {2, 1}, {2, 1}, {2, 1}, {2, 1}};probit = ProbitModelFit[data, x, x]Compute the covariance matrix:
probit["CovarianceMatrix"]Compute the covariance matrix estimating the dispersion by Pearson's
:
probit["CovarianceMatrix", DispersionEstimatorFunction -> "PearsonChiSquare"]IncludeConstantBasis (1)
LinearOffsetFunction (1)
data = {{0, 1}, {1, 0}, {3, 1}, {5, 0}};ProbitModelFit[data, x, x]//NormalFit data to a model with a known Sqrt[x] term:
ProbitModelFit[data, x, x, LinearOffsetFunction -> (Sqrt[#]&)]//NormalNominalVariables (1)
data = {{a, 0, 0}, {b, 2, 1}, {a, 2, 0}, {b, 0, 1}, {a, 2, 1}, {b, 0, 0}};Fit the data, treating the first variable as a nominal variable:
nom = ProbitModelFit[data, {x, y}, {x, y}, NominalVariables -> x]Normal[nom]Treat both variables as nominal:
ProbitModelFit[data, {x, y}, {x, y}, NominalVariables -> All]//NormalWeights (1)
WorkingPrecision (1)
Use WorkingPrecision to get higher precision in parameter estimates:
data = Table[{x, (10 - x) / 10}, {x, 10}]probit = ProbitModelFit[data, x, x, WorkingPrecision -> 25]probit["BestFit"]Reduce the precision in property computations after the fitting:
probit["BestFit", WorkingPrecision -> MachinePrecision]Properties & Relations (4)
ProbitModelFit is equivalent to a "Binomial" model from GeneralizedLinearModelFit with "ProbitLink":
data = Table[{i, RandomReal[{i - 1, i}] / 10}, {i, 10}];GeneralizedLinearModelFit[data, x, x, ExponentialFamily -> "Binomial", LinkFunction -> "ProbitLink"]//NormalprobitFit = ProbitModelFit[data, x, x]//NormalLogitModelFit is a "Binomial" model from GeneralizedLinearModelFit with default "LogitLink":
GeneralizedLinearModelFit[data, x, x, ExponentialFamily -> "Binomial"]//NormallogitFit = LogitModelFit[data, x, x]//NormalProbitModelFit assumes binomially distributed responses:
data = Table[{i, RandomReal[{i - 1, i}] / 10}, {i, 10}];pm = ProbitModelFit[data, x, x]NonlinearModelFit assumes normally distributed responses:
nm = NonlinearModelFit[data, 1 / 2(1 + Erf[(a + b x) / Sqrt[2]]), Transpose[{{a, b}, pm["BestFitParameters"]}], x]{Normal[pm], Normal[nm]}Plot[{pm[x], nm[x]}, {x, 1, 5}, PlotRange -> All]ProbitModelFit will use the time stamps of a TimeSeries as variables:
ts1 = TemporalData[TimeSeries, {{{0.7758532198866042, 0.20426632015371096, 0.2353690565215641,
0.4448009174525732, 0.5081575045542254, 0.5371908040104083, 0.6223323745794831,
0.669522447912184, 0.7204685251554224, 0.7633871517003976}}, {{0, 9, 1}}, 1, {"Continuous", 1},
{"Discrete", 1}, 1, {ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False,
10.1];ts1["Times"]ProbitModelFit[ts1, x, x]Rescale the time stamps and fit again:
ts2 = TimeSeriesRescale[ts1, {.1, 2}]ts2["Times"]ProbitModelFit[ts2, x, x]ProbitModelFit[ts1["Values"], x, x]ProbitModelFit acts pathwise on a multipath TemporalData:
ProbitModelFit[TemporalData[Automatic, {{{0.009753347177267509, 0.18455899093641098, 0.20260886672737863,
0.37977270854029854, 0.45927203330240407, 0.5010683896315415, 0.6468842072138713,
0.7452632634563319, 0.8683334166368966, 0.9876532168951402},
... 2138713, 0.7452632634563319,
0.8683334166368966, 0.9876532168951402}}, {{0, 9, 1}, {0.1, 2., 0.2111111111111111}}, 2,
{"Continuous", 2}, {"Discrete", 2}, 1,
{ResamplingMethod -> {"Interpolation", InterpolationOrder -> 1}}}, False, 10.1], x, x]Tech Notes
Related Guides
Text
Wolfram Research (2008), ProbitModelFit, Wolfram Language function, https://reference.wolfram.com/language/ref/ProbitModelFit.html (updated 2025).
CMS
Wolfram Language. 2008. "ProbitModelFit." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/ProbitModelFit.html.
APA
Wolfram Language. (2008). ProbitModelFit. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ProbitModelFit.html
BibTeX
@misc{reference.wolfram_2026_probitmodelfit, author="Wolfram Research", title="{ProbitModelFit}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/ProbitModelFit.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_probitmodelfit, organization={Wolfram Research}, title={ProbitModelFit}, year={2025}, url={https://reference.wolfram.com/language/ref/ProbitModelFit.html}, note=[Accessed: 13-June-2026]}