Hello, I am running a two-component mixture model via PROC FMM, and want to compare the coefficient of a variable from the first component to the coefficient of the same variable in the second component. I noticed PROC FMM does not have an ESTIMATE or CONTRAST statement available, and I am wondering if it is otherwise possible to implement this comparison. Using the example below, I would like to compare the coefficient for 'dose' in component 1 to the coefficient for 'dose' in component 2 (and ideally get a confidence interval as well). I appreciate any suggestions. data assay;
label dose = 'Dose of quinoline (microg/plate)'
num = 'Observed number of colonies';
input dose @;
logd = log(dose+10);
do i=1 to 3; input num@; output; end;
datalines;
0 15 21 29
10 16 18 21
33 16 26 33
100 27 41 60
333 33 38 41
1000 20 27 42
;
run;
proc fmm data=assay;
model num = dose logd / dist=Poisson k = 2;
run;
... View more
Can some one please help to get rid off completely table of contents in proc ods pdf ?
ods pdf file="c:\test.pdf" contents=no;
proc report data=table contents=' ' headline nowindows;by id;
still it is showing left side table of contents as ID and values
I need ID in by variable od proc report but not in table of conents .
... View more
IND_F = ID1 >= ID2 >= ID3 ; One of the program says as below can someone please help what does that mean? They are all date values. I am seeing value of IND_F = 1 for few records not sure how ? Regards kajal
... View more
Hi, ¨Why don¨'t strawberry print out in this code? (this is just fiction dataset that I created, they don't both come from WORK. Banana comes from ex libname Africa, and strawberry from UK. So I want to have them seperated. Thanks! data banana;
length banana 8 fruit 8;
do year = 2014 to 2023;
date = input(cats(put(year, 4.), '1231'), yymmdd8.);
do i = 1 to 25;
customer = cats('Customer', (year - 2014) * 25 + i);
banana = round(ranuni(0) * 100, 0.01);
fruit = ceil(ranuni(0) * 2) - 1;
output;
if i <= 10 then do;
customer = cats('Customer', (year - 2014) * 25 + i);
banana = round(ranuni(0) * 100, 0.01);
fruit = ceil(ranuni(0) * 2) - 1;
output;
end;
end;
end;
format date yymmddn8.;
drop i year;
run;
data strawberry;
length strawberry 8 fruit 8;
do year = 2014 to 2023;
date = input(cats(put(year, 4.), '1231'), yymmdd8.);
do i = 1 to 25;
customer = cats('Customer', (year - 2014) * 25 + i);
banana = round(ranuni(0) * 100, 0.01);
fruit = ceil(ranuni(0) * 2) - 1;
output;
if i <= 10 then do;
customer = cats('Customer', (year - 2014) * 25 + i);
strawberry = round(ranuni(0) * 100, 0.01);
fruit = ceil(ranuni(0) * 2) - 1;
output;
end;
end;
end;
format date yymmddn8.;
drop i year;
run;
%macro check_column_types(libname=, memname=,);
proc contents data=&libname..&memname out=columns_info(keep=name type);
run;
/* Skapa temp-dataset */
data column_types;
set columns_info;
/*ATTRN (en sas-funktion som används för att hämta attribut för en variabel i ett dataset) bestämemer datatypen*/
array char_cols[*] _character_;
array num_cols[*] _numeric_;
do i = 1 to dim(char_cols);
if vname(char_cols[i]) = name then do;
column_type = 'CHAR';
output;
end;
end;
do i = 1 to dim(num_cols);
if vname(num_cols[i]) = name then do;
column_type = 'NUM';
output;
end;
end;
run;
proc print data=column_types noobs;
title 'BANANA NNANANBANANABNASBA';
run;
/* Rensa temp-datasets */
proc datasets library=work nolist;
delete columns_info column_types;
quit;
%mend;
%check_column_types(libname=work, memname=banana);
%macro check_column_types(libname=, memname=,);
proc contents data=&libname..&memname out=columns_info(keep=name type);
run;
/* Skapa temp-dataset */
data column_types;
set columns_info;
/*ATTRN (en sas-funktion som används för att hämta attribut för en variabel i ett dataset) bestämemer datatypen*/
array char_cols[*] _character_;
array num_cols[*] _numeric_;
do i = 1 to dim(char_cols);
if vname(char_cols[i]) = name then do;
column_type = 'CHAR';
output;
end;
end;
do i = 1 to dim(num_cols);
if vname(num_cols[i]) = name then do;
column_type = 'NUM';
output;
end;
end;
run;
proc print data=column_types noobs;
title 'STRAWBERRY BERYRYEYRYRWEBERBE';
run;
/* Rensa temp-datasets */
proc datasets library=work nolist;
delete columns_info column_types;
quit;
%mend;
%check_column_types(libname=work, memname=strawberry);
... View more
Hi, I'm fighting with a translate() function in my new job. I have my 'old faithful' code fragment to remove diacritics (accented characters) which worked fine (both: in datastep and proc sql) -till current job: TRANSLATE(FirstNAME, "aaccdeeillnnoorrsstuyzz", "áäčćďéěíĺľňńóôŕřšśťúýžź") + I tried to replace " with apostrophs >>> no! + I tried to change obly one character (e.g. á to a) - it worked well + but when I extend <StringFROM> and <StringTO> to very small set of characters (fom 'áíšžň' to 'aiszn') >> translate() started to mix the characters: .. + Adamík =>>> Adami k ... error: add space after correct change + Arpáš =>>> Arpi � ... change á to i instead of a + strange char inst. "s" + Badáň =>>> Badi ň ... same "a" + ignore ň from list + Ažimov =>>> Ažimov ... ignore ž Bonus: I have another 'shape' to remove strange chars from a name and it seems works 😄 ... (all are changed to a space which is further celaning by COMPBL() 😞 COMPBL(translate(FirstNAME, " ", "0123456789/\:;|{}[]()!@#$%^&*_.,-")) as MyLoveNAME, Have somebody an idea where is it screwed? PS: I hacked it by this ugly patch ... tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd(tranwrd( lowcase(cli.FirstNAME), 'á', 'a'), 'ä', 'a'), 'č', 'c'), 'ď', 'd'), 'é', 'e'), 'ě', 'e'), 'í', 'i'), 'ĺ', 'l'), 'ľ', 'l'), 'ň', 'n'), 'ó', 'o'), 'ô', 'o'), 'ŕ', 'r'), 'ř', 'r'), 'š', 's'), 'ť', 't'), 'ú', 'u'), 'ý', 'y'), 'ž', 'z') as NameNoDIA, ...but it makes me sick 😞 and -truly: i'm surprising it works. -thx- Martin
... View more