Colleuges
I ma trying to analyse a data where there are FIVE areas where to find an impact. These Five areas are named SubA through to SubE. The independent variables are pH, Turbidity,...EC. If an impact is found, it is either found on one of the SubA..SubE. If an impact is found then it is represented by 1 otherwise 0; I tried to use the logistic regression for each SubA...SubE as follows:
proc logistic data=dataset1 outest = betas covout;
model SubA(event = '1') = Temp Salinity Turbidity Conductivity TC EC
/ selection = stepwise
slentry = 0.5
slstay = 0.5 details lackfit;
by Season;
run;
proc logistic data=dataset1 outest = betas covout;
model SubB(event = '1') = Temp Salinity Turbidity Conductivity TC EC
/ selection = stepwise
slentry = 0.5
slstay = 0.5 details lackfit;
by Season;
run;
Is there no SAS Procedure that I can use for better analysis of this data?
proc logistic data=dataset1 outest = betas covout;
model SubA(event = '1') = Temp Salinity Turbidity Conductivity TC EC
/ selection = stepwise
slentry = 0.5
slstay = 0.5 details lackfit;
by Season;
run;
There are at least 3 issues in your problem.
[1] the definition of dependent variable. For LR, it takes 0/1. You are mixing it with 5 Areas. I recommend you to use a new variable to hold 0 or 1 and use 5 areas as categorical independent variable.
[2] The BY statement. The regression coefficients are determined using the number of covariate-patterns of the independent variables. It means the number of distinct patterns found in your data. The more that number better the betas. The use of BY might reduce that number. My suggestion is use SEASON as a categorical independent variable.
[3] Stepwise Regression. There are two views on its need. Do not use it because SAS provides that option. Do LR first without it and if you have sufficient number of covariate patterns then try STEPWISE.
All the best.
@mmohotsi wrote:
Is there no SAS Procedure that I can use for better analysis of this data?
What "better analysis" are you looking for? Describe how the analysis you have shown is not sufficient.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.