to adjust variables {controlling them} in logestic regression, you need to enter your variables in steps. In the early step you have to enter the variables you want to adjust for (age & gender), in the next step you enter the rest of your variables.
you will see the option (next step) in SPSS statistics
If you have age in years, treat it as a covariate, as Basheer suggested. But note that this forces a linear relationship between age and the fitted log-odds. You might want to investigate the possibility of a non-linear relationship. To relax that constraint, and allow a U- or inverted U-shaped function, include Age and Age2. To relax the constraint even further, allowing a cubic relationship (i.e., 2 changes in direction) include Age, Age2 and Age3.
For gender, it is simple, if you using 0 (say for male) and 1 (female), no matter you treat it as binary or number(continues), both are fine. But you need pay attention how does SPSS code binary factor, which is important how to explain your results.
For age, you may do that as Bruce suggested, adding age and power of age for non-linear. But you may group age into several subgroups. According the age distribution and size of your sample for study the non-linear ship between age and outcome. Say, (suppose all are adults, and age is integer with no decimals): 10). If the neighbor of groups have the same effect in magnitude and sign on the outcome, you may combine them into one groups. If categorical age shows linear on log of OR, you can feel free use age as continuous covariate.
In the model, you need one parameter for the continuous covariate, and k-1 parameters for k-level categorical covariates. The sample size should be greater than 10* total number of parameters (including the intercept), at least 5 times.
Since gender is a categorical data you will need to code it as (0=male and 1=female or vice-versa) and age is continuous variable, you will have to leave the way it is except you are looking at the age group then you can have (10-20 as 1 and 21-30 as 2 e.t.c.)
Some posters have suggested carving age into categories. Generally (although there may be some exceptions), it is not advisable to carve good continuous variables into categories, other than for preliminary exploratory analyses aimed at determining the shape of the functional relationship with the outcome variable. There are many articles that discuss the detrimental effects of categorizing continuous variables (e.g., loss of power, creation of artificial step-functions, etc.). Below is a link to one of those articles by David Streiner. HTH.
For linear regression, one of the assumptions for linear regression is the linear relationship between DV and IVs. If DV is continuous, it can be easy to see from a scatter plot.
Here is a logistic regression, the linear relation is assumed for log(OR) and age, we should verify it. For verify the linear relationship between ln(OR), grouping the age into category, definitely is ordinal, is necessary. Hence do the logistic regression with grouping age first is necessary, if the categorize age and log(OR) shows the linear relation, using age as continuous covariate, otherwise re-grouping it based on the initial grouping. AIC or BIC can help to choose the suitable number of groups. (The smaller the better).
The following is quoted from the David Streiner http://isites.harvard.edu/fs/docs/i....files/dichotomizing_continuous.pdf
"It's Not All Bad
Up to now. we've treated categorization of a continuum as an
unmitigated disaster with no redeeming features. At the risk of
appearing to be a Pollyanna who can find positive things to
say about the worst situations, there are in fact a few situations
wherein we actually should divide a continuous variable into a
I am not sure about the intention of the question. If you simply want to "adjust" by sex and age, man... you should add them to the model (use the UCLA link below). If you want to argue if you can add them or not, NOBODY can give you an answer with the data you presented: no outcome, no relationship with them no nothing...
The preceding discussion has veered in an interesting direction: What to do about continuous variables, such as age, in regression models. Personally, while I understand that keeping continuous data in their pristine form (or centering by subtracting the mean) preserves the information in the data, it may compromise interpretation. It may be worthwhile, for example, to estimate the odds ratio associated with an age of 40-50 compared to 20-30, as oppose simply estimating the effect of an additional year, which frankly is often not interesting or useful and may obscure important trends in the data..
Hi everyone, as a newbie, i understood the process to adjust for the age and gender. But can someone explain to me that what if my outcome of interest is not affected by age and gender (i.e. p-value for univariate analysis is >0.05). Is there still a need to adjust for age and gender??
@Omaid: Bivariate pre-screening of candidate explanatory variables should be avoided, as it leads to over-fitting. Mike Babyak discusses this (among other things) in his nice article on over-fitting regression models (see link below). HTH.
My study involves a non-inferiority trial comapring two drugs. I am measuring percentage change in relapse freqeuncy of a disease using either of two drugs over a 1 year period (20 patients per group). One of the groups inadvertantly has patients with higher mean age. Hpw do I adjust results for age. Is there an option in SPSS program?