title: Manually build logistic regression model for prediction in R
body: <p>I'm attempting to test a logistic regression model (e.g. 3 coefficients for 3 predictor variables, X1,X2,X3), on a dataset.  I'm aware of how to test a model after i created the model object using, for example,</p>
  
  <pre><code>mymodel &lt;- glm( Outcome ~  X1 + X2 + X3 , family = binomial,data=trainDat)
  </code></pre>
  
  <p>and then test the data</p>
  
  <pre><code>prob &lt;- predict(mymodel,type="response",newdata=test)
  </code></pre>
  
  <p>But i want to, now, create a logistic model using coefficients and intercept that I have, and then test this model on data. </p>
  
  <p>Basically I'm not clear on how to create "mymodel" without running glm.</p>
  
  <p>Context for the question:
   I've run a logistic regression using offsets eg:</p>
  
  <pre><code>mymodel &lt;- glm(Outcome ~ offset(C1 * X1) + offset(C2 * X2) + X3, 
                 family = binomial, data = trainDat)
  </code></pre>
  
  <p>Thus, the mymodel object generates a model with only an intercept (I) and C3 coefficients (for feature X3).<br>
  I now need to test the full model (i.e. I + C1*X1 + C2*X2 + C3*X3), on a test dataset, but I don't know how to get the full model, since the output of mymodel has only intercept and C3.   So I thought my more general question was: "how do you manually build a logisitic regression model object?"</p>
  
  <p>Thank you for your patience.</p>