Problem with a regression in "R" - Dataset Workinghours

#1
I'm a student. I'm working on a research using the statistical program "R 2.15.1".
Here's my problem: how i can do a regression considering only values over a certain limit?

Giorgio
 
Last edited:

trinker

ggplot2orBust
#2
If it's a simple yes no (yes >= 8 or no < 8) I think I'd reassign the
variable to be a binary variable and run logistic regression.

Pretent your data is called dat...

Code:
dat$outcome <- as.numeric(hoursday >= 8)

Code:
glm(outcome ~ income+age+education+unemp+child5+child13+child17+ nonwhite+
    owned+mortgage+occupation, data=dat, family = "binomial")
For more on logistic regression in R see UCLA's excellent website (LINK)
 
#3
If it's a simple yes no (yes >= 8 or no < 8) I think I'd reassign the
variable to be a binary variable and run logistic regression.

Pretent your data is called dat...

Code:
dat$outcome <- as.numeric(hoursday >= 8)

Code:
glm(outcome ~ income+age+education+unemp+child5+child13+child17+ nonwhite+
    owned+mortgage+occupation, data=dat, family = "binomial")
For more on logistic regression in R see UCLA's excellent website (LINK)
Thank you. I found the website useful too!
 

Dason

Ambassador to the humans
#4
Did you want to do what trinker suggested and tried to figure out the probability that the outcome exceeds a certain limit? The way I read the original post was that you wanted to do a regression but only use values that exceeded a certain value.