I need the following statement to output a dataset with my random effects (randoms3) using weighted data. However, when I include the weight statement below, the dataset, randoms3, does not output. It only outputs missing data. When I remove the weights statement, the dataset randoms3 does output correctly. Does anyone know why this is?
glimmix data=data;
ctycode1;
asthma3 = sex age race2 agegp nohs/solution dist=binary link=logit ddfm=satterth oddsratio;
random ctycode1 / solution;
tech=nrridg;
out=brfssout pred=pred3;
output CovParms = randoms3 ParameterEstimates = fixed3;
weight weight;
run;
First thing is check the values of your weight variable. Missing or negative values will mean that observation is not used.
My weights are all there. They're pretty low though.
Min=.002, Max=1.03.
It looks like your posted code is missing some text, it may help to repost.
Do you get any warnings in the log when missing data is generated?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.