The model that I created in R is:
fit <- lm(hired ~ educ + exper + sex, data=data)
what I am unsure of is how to fit to model to predict probability of interest where p = pr(hiring = 1).
Edit: This is the computer output for what I have computed so far. I am unsure if this is even a step in the right direction to find the answer to this question.
What I am trying to do is, Fit a logistic regression model to predict the probability of being hired using years of education, years of experience and sex of job applicants.
> test<-glm(hired ~ educ + exper + sex, data=data, family=binomial(link="logit")) > summary(test) Call: glm(formula = hired ~ educ + exper + sex, family = binomial(link = "logit"), data = data) Deviance Residuals: Min 1Q Median 3Q Max -1.4380 -0.4573 -0.1009 0.1294 2.1804 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -14.2483 6.0805 -2.343 0.0191 * educ 1.1549 0.6023 1.917 0.0552 . exper 0.9098 0.4293 2.119 0.0341 * sex 5.6037 2.6028 2.153 0.0313 * --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 35.165 on 27 degrees of freedom Residual deviance: 14.735 on 24 degrees of freedom AIC: 22.735 Number of Fisher Scoring iterations: 7
hired, it won't be able to do what you are asking of it (even presuming that "hiring" and "hired" are the same variable). Do you think you could tell us something about the data and what you're really trying to find out? $\endgroup$
hiredvariable? How does it relate to hiring probability? $\endgroup$