Hi, I ran a simple multinomial logit model using proc GLIMMIX. The model predicts occupation in 4 categories (high, medium, low, unemployed) with the normalized difference in supply and demand and a region fixed effect parameter. The result is quite strange as it produces estimates for the reference category for the region parameters. I also notice that the p-values with proc GLIMMIX look a bit odd, all of them for the category "HIGH" are higher than 0.99.
When I replicate the same model with proc LOGIT, everything looks fine, with consistent parameters and p-values. How can I fix this? I need to use proc GLIMMIX since I will eventually add some random effects.
proc glimmix data=lab.merge INITGLM;
class occ_reduced(ref='LOW') region(ref='SK') ;
model occ_reduced = diffH diffM diffL region / solution DIST=MULTINOMIAL link=glogit;
where labour=1;
weight weight;
run;
proc logistic data=lab.merge;
class region / region(ref='SK') / param = ref;
model occ_reduced(ref='LOW') = diffH diffM diffL region / link = glogit;
weight weight /norm;
where labour=1;
run;
... View more
Hello - I know questions like mine have been asked before, but I wasn't able to find an answer that I could adapt to my situation. I would like to create a single bar chart with individual bars for several variables in my dataset, where the values for each variable are either 0 or 1 for each record in the dataset. I created a series of binary (0/1) variables from questions on a survey where respondents could select one more options (e.g. bn_option1, bn_option2, ...) . Now I'd like to create bar charts for the % of '1's for each option (binary variable) of the corresponding question. One bar chart per question with as many bars as there were originally options. Thanks.
... View more
Hi, I have a fiction dataset that I've created like this data countries;
length country $20 country_1 $50;
input country $ country_1 $;
datalines;
AE United Arab Emirates
AR Argentina
AU Australia
Africa Africa
Asia Asia
CA Canada
CH Schweiz
CN China
DE Germany
ET Etiopia
EU Europe
FR France
GB United Kingdom
GM Gambia
KR Republic of Korea
KZ Kazakstan
Latin_America_31 Latin America-31
Middle_East Middle East
NO Norway
NP Nepal
NZ New Zealand
Non_EU_Europe Non-EU Europe
PE Peru
PH Philippines
RU Russia
TR Turkey
UA Ukraine
World World
;
run;
data countries_extended;
set countries;
do i = 1 to ceil(ranuni(0) * 100); /* Upprepa varje land slumpmässigt upp till 100 gånger */
output;
end;
drop i;
run; and I have SAS 9.4 - which mean it can't take union all, and such. How do I create a variable a variable hierarchy, beacuse now it is mixed in col=country. I've read that you can self join in this case, but the output was bad.. Which I tried to do, but it didn't went well. Can someone please help me out?
... View more
Hi, Can anybody help me with formatting the datetime correctly in my program? I am mostly getting blank columns or getting the date as 01Jan1960:9:25:00 Etc. Here's the code I am using data x; set x; y_new = input(y, andtdtm.); format y_new datetime22.; run; And here's how some values in the datetime column look like when imported into SAS: 45348.3506829051 45349.8328009028 45350.7706134028 Thank you! Best regards, Abhishek
... View more
Hello everyone, I have survey data of approximately 5000 participants and I am currently looking to model the outcome of a dichotomized response variable to a predictor. Our question is if there is a trend of participants being more likely to be in the 1 level of the response variable as we move from 4 to 1 in the ordinal response predictor. The dichotomized response has levels 1 and 0 while the predictor is an ordinal survey response with levels 1 - "Yes - completely", 2 - "Yes - mostly", 3 - "Yes - somewhat", and 4 - "No". I am currently wondering how to structure my proc logistic code and also weighing the use of proc logistic vs. proc surveylogistic. I do not have survey weights, so it seems that proc surveylogistic would not be useful in comparison to proc logisitic. Here is my code so far: proc logistic data = import plots=all;
class outcome q1 / param=ordinal;
model outcome = q1;
run; I chose ordinal for the param= statement however I am not sure about that, though changing the param= option does not change the model fit statistics. I will continue to read documentation about proc logistic to see what other options might suit, but if there are any suggestions please let me know. Thank you!
... View more