Using SPSS, can we perform the correlation analysis on two variables when one variable is containing the nominal or ordinal data whereas the other one is containing scale values?
I now understand that the response is categorical - and the predictor variables is continuous.
Consequently if the sleep variables is binary I would consider using a binary logit model ; if it is ordinal I would consider a multinomial logit model. Both approaches are available in SPSS. There are several advantages- there is no loss of power in converting Years to a category; you get an assessment of the strength of the relation, there are associated inferential procedures, and you can identify outliers and influential observations. The downside is the increase in needed technical sophistication to understand and use the procedures.
The site will give you the needed technical background
If the requirement is to check whether the work duration is related to difficulty in sleeping or not? If correlation cannot be applied, which test will be suitable?
If by correlation you mean Pearson the answer is no. However there are other types of correlation coefficients. eg Spearman, point biserial, etc. I don't know what to suggest because I don't what data containing scaled values is.
Dear Javed, If I understand your problem correctly, you want to assess whether there is any association between the work exposure and the difficulty in sleeping. Work exposure can also be made as a categorical variable by dividing the exposure into 1-3 years, 3-5 years; 5-10 years or as low exposure, medium exposure and high exposure categories. Definition of these could be based on your understanding as to what exposure affects the sleeping pattern. Once you do this, try chi-square to test the hypothesis that work exposure and sleeping pattern is related? Based on raw data, the work exposure can easily be converted to categorical variable on SPSS. Then use of tabulation key not only will give you the cross tabulations of work exposure and sleeping pattern but also indicate the chi-square value with p- value. So, go ahead and try this.
I now understand that the response is categorical - and the predictor variables is continuous.
Consequently if the sleep variables is binary I would consider using a binary logit model ; if it is ordinal I would consider a multinomial logit model. Both approaches are available in SPSS. There are several advantages- there is no loss of power in converting Years to a category; you get an assessment of the strength of the relation, there are associated inferential procedures, and you can identify outliers and influential observations. The downside is the increase in needed technical sophistication to understand and use the procedures.
The site will give you the needed technical background
To establish whether or not there is a relationship between difficulty in falling asleep (Yes/No) and work exposure (number of hours) all you need to do is to do a two-sample test for means (t-test if the work exposure has a normal distribution - unlikely - or Wilcoxon two-sample test).This will give you a yes or no answer (yes, there is a relationship, or no there is not a relationship). If you want a prediction model, use a binary logistic regression model. This will give you the probability of having difficulty in falling asleep as a function of the number of hours of work exposure.
If you use a Chi-square test, you loose the ranking information in the ordinal data. Essentially you reduce the ordinal variable to a nominal variable. I think you get the same problem with multinomial regression.
As Kelvyn Jones has suggested a logistic regression makes sense if the ordinal variable is binary. However, if has more than two levels ordinal regression would make sense in my opinion.
These suggestions assume that you want to predict the ordinal variable though.
To be clear I think Francois has the y and X around the other way, so that the continuous hours is the predictor.
If there are multiple outcome categories then you could consider a multinomial model - the multinomial bit is the error distribution that is required (in contrast, standard regression modelling is usually a Gaussian or equivalently a normal theory model). The multinomial comes in two flavors - un- ordered (that is nominal- I travel to work by Car, Bus , Train, Other) - ordered (that is ordinal eg None Some, A Lot, A great Deal).