({{, (RefLink[LinearOffsetFunction, paclet:ref/LinearOffsetFunction]) 
is an option for linear and generalized linear model fitting functions that specifies a component for the model that is to be assumed known.}})

OpenersNotesSection(Spacer1)Details

(RefLink[LinearOffsetFunction, paclet:ref/LinearOffsetFunction]) is an option for (RefLink[LinearModelFit, paclet:ref/LinearModelFit]), (RefLink[GeneralizedLinearModelFit, paclet:ref/GeneralizedLinearModelFit]), (RefLink[LogitModelFit, paclet:ref/LogitModelFit]), and (RefLink[ProbitModelFit, paclet:ref/ProbitModelFit]).

(RefLink[LinearOffsetFunction, paclet:ref/LinearOffsetFunction])->func specifies that the model to be fitted should have a linear predictor of the form func[(Subscript[x, 1]),(Subscript[x, 2]),…]+(Subscript[β, 0])+(Subscript[β, 1]) (Subscript[f, 1])+(Subscript[β, 2]) (Subscript[f, 2])+⋯.

(RefLink[LinearOffsetFunction, paclet:ref/LinearOffsetFunction]) defines a known component of the linear predictor for each data point.

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Fit data to a linear model:

data={{0,1},{1,1.5},{3,2},{5,4}};

LinearModelFit[data,x,x]//Normal

Fit data to a linear model with a known (RefLink[Exp, paclet:ref/Exp])[x] term:

LinearModelFit[data,x,x,LinearOffsetFunction->(Exp[#]&)]//Normal

OpenersExampleSection1(Spacer1)Scope  (3)

Fit data to a generalized linear model:

data={{0,1},{1,1.5},{3,2},{5,4}};

GeneralizedLinearModelFit[data,x,x,ExponentialFamily->"Gamma"]//Normal

Fit to a model with a known (RefLink[Sqrt, paclet:ref/Sqrt])[x] term in the linear predictor:

GeneralizedLinearModelFit[data,x,x,ExponentialFamily->"Gamma",LinearOffsetFunction->(Sqrt[#]&)]//Normal

Fit to a model with a known constant term:

GeneralizedLinearModelFit[data,x,x,ExponentialFamily->"Gamma",IncludeConstantBasis->False,LinearOffsetFunction->(2&)]//Normal

Include a linear offset in a logit model:

LogitModelFit[{.1,.3,.5,.6,.8},x,x,LinearOffsetFunction->(Sin[#]&)]//Normal

A probit model:

ProbitModelFit[{.1,.3,.5,.6,.8},x,x,LinearOffsetFunction->(Sin[#]&)]//Normal

Include an offset as a function of multiple variables:

GeneralizedLinearModelFit[{{4.3,2,1.2},{3.8,3.3,.6},{4.5,3,.7},{3,4.2,.5},{2,2.1,1.4}},{x,y},{x,y},ExponentialFamily->"InverseGaussian",LinearOffsetFunction->(#1 #2&)]//Normal

The model fitting a coefficient to the x y term:

GeneralizedLinearModelFit[{{4.3,2,1.2},{3.8,3.3,.6},{4.5,3,.7},{3,4.2,.5},{2,2.1,1.4}},{x,y,x y},{x,y},ExponentialFamily->"InverseGaussian"]//Normal

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[GeneralizedLinearModelFit, paclet:ref/GeneralizedLinearModelFit])  ▪  (RefLink[LinearModelFit, paclet:ref/LinearModelFit])  ▪  (RefLink[LogitModelFit, paclet:ref/LogitModelFit])  ▪  (RefLink[ProbitModelFit, paclet:ref/ProbitModelFit])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Statistical Model Analysis, paclet:guide/StatisticalModelAnalysis])}})}})