How can I write a prediction formula if I can't use the glm's predict function ?
If I have a model that uses the
family=binomial(link="logic") I would write the model like this:
model_1<-glm(IsUp ~ var1+var2,data-train ,family=binomial(link="logic"))
Then I would run the model summary, get the coefficients, including the intercept, and create the prediction formula:for example:
intercept = 0.78, var1 coeff is 0.28 and var2 coeff is 0.5
train$glm_pred1<-1/(1+exp(-(0.78+(train$var1* 0.28 + train$var2 *0.5))))
But how can I create a prediction function when my model is based on Gaussian like in this model:
model_2<-glm(IsUp ~ var1+var2,data=train)
The summary of the model indicates that the intercept is 0.66, var1 coeff is 0.3 and var2 coeff is 0.8?