Predicted Probabilities with Predict.Plot
I'm running the following logistic regression model in R and one of the important predictors is our_bid, which is a numeric and continuous variable that ranges from 0.30 to 0.80. When I attempt to draw the probability curve for the model using the effects package, I was expecting that I could predict the response variable based on our_bid from 0.00 to 2.00. Even though those values aren't present in my data set, I thought I could use the model to predict on values outside the values currently that are in our_bid.
mod1 = glm(factor(won_ping) ~ our_bid + age_of_oldest_driver2 + credit_type2 + coverage_type2 + home_owner2 + state2 + currently_insured2 + hour_of_day4 + vehicle_driver_score, data=dat, family=binomial(link="logit")) Predict.Plot(mod1, pred.var = "our_bid", our_bid = 250, age_of_oldest_driver2 = "22 to 25", credit_type2 = "FAIR", coverage_type2 = "BASIC", home_owner2 = "1", state2 = "top", currently_insured2 = "1", hour_of_day4 = "1pm to 7pm", vehicle_driver_score = "0", plot.args = "list(xlim=c(0,100))", type = "response")
This results in the following plot, which doesn't give all the predicted values from 0 to 1.00. I'm not sure why I'm not able to use the statistical model to predict outside the bounds of the values in that variable (our_bid).
I don't see any need for the rms package above and the Predict.Plot function is not in rms or any of the standard packages.
If you mean the Predict.Plot function from the TeachingDemos package then specifying xlim in the plot.args section only sets the width of the window and does nothing with the predictions. If you read the details section of the help page for Predict.Plot you will see that you need to give it 2 values for the prediction variable if you want to specify the range that it predicts from (otherwise it just uses the range of the data used to fit the model). So it looks like you want our_bid=c(0,100) or something like that. If you provide some data in a reproducible format then we can test and give better advice.