Recently in the SAS Community Library: SAS' @Sundaresh1 highlights a sometimes overlooked task when applying document embeddings for purposes of similarity-based search. Normalisation of vectors helps obtain relevant matches.
Good day everyone, New EG user here. I am working with a legacy program that looks for lab errors. The numeric errors are assigned a number that represents a letter code. Error #14 has been changed at the lab into 14A and 14B, which results in log notes stating "Invalid numeric data, "14A", at line 115 column 78. How can I edit the code to prevent this? ****import parameter files***; %macro newdata (outfile, filename,param,param_g,param_error, param_a); data first; %let _EFIERR_ = 0; /* set the ERROR detection macro variable */ infile &filename delimiter = ',' MISSOVER DSD lrecl=32767 firstobs=1 ; informat year best32. ; informat month best32. ; informat day best32. ; informat labid best32. ; informat ¶m_g $2. ; informat ¶m best32. ; informat ¶m_error best32. ; informat ¶m_a $2. ; *informat labsignoff $3. ; format year best12. ; format month best12. ; format day best12. ; format labid best12. ; format ¶m_g $2. ; format ¶m 7.3 ; format ¶m_error best12. ; format ¶m_a $2. ; *format labsignoff $3. ; input year month day labid ¶m_g $ ¶m ¶m_error ¶m_a $ ;*labsignoff $ ; if _ERROR_ then call symputx('_EFIERR_',1); /* set ERROR detection macro variable */ run; proc sort; by labid year month day; data &outfile; set first; if ¶m_error = 0 then do; ¶m_A = "";end; if ¶m_error = 23 then do; ¶m_A = "QQ";end; if ¶m_error = 1 then do; ¶m_A = "A"; ¶m = .; end; if ¶m_error = 22 then do; ¶m_A = "JJ";end; if ¶m_error = 18 then do; ¶m_A = "RR";end; if ¶m_error = 6 then do; ¶m_A = "RR";end; if ¶m_error = 9 then do; ¶m_A = "V";¶m = .;end; if ¶m_error = '14A' then do; ¶m_A = "FF";end; if ¶m_error = '14B' then do; ¶m_A = "V"; end; *proc print; %mend; Thanks for considering this puzzle.
... View more
Hi,
I am working with a study where we expect an exponential decay relationship between increasing dose and a pharmacodynamic response variable of interest. An initial idea was therefore to model this using an exponential regression model on the form
y = ab x
where b is the parameter of interest to estimate (x is the dose). This could be done fairly easily, since it transforms to linear model on log-scale. However, there are also repeated measurements per patient, since the same patient is measured at different dose levels. To avoid a potential problem of correlated data points in the model, a proposal is to
1) fit the model separately for each patient and
2) Retrieve all estimates of b and
3) Perform a t-test of the values of b to investigate if mean of b is below 1 (proving a dose-dependent response in Y).
However, while this seems to solve the problem of correlated data points, I am doubtful if it is the most efficient/powerful approach to analyse the data. Some patients have very few datapoints (as few as 3), so it does not seem very robust to me to analyse all of them separately. I am contemplating whether the current model could be extended instead with a mixed effect for patient, something like this:
y = apb x
where p is the random effect for patient, allowing observations to be correlated within the same individual.
Would this be a viable alternative? Which approach is preferable? Do I need to extend the modelling approach even further allowing for a random coefficient model?
Any input and ideas would be helpful.
Kind Regards,
JoakimE
... View more
I am using proc transpose to change the table from wide to long. But in the column "old-column" the old some variable names are truncated. What can I do, to get them in the original length?
proc transpose data=have
name =old_column
out=want
by column_to_keep;
run;
Thanks,
Markus
... View more
Hi, I was wondering whether it is correct to analyze the dependent variable X on a Likert scale (scale 1 -5) with the independent variables TRT (1, 2, 3 and 4) and product (A, B and C) with this model: proc logistic; class trt product; model X (EVENT='1')=trt product; run; or this one: proc glm; class trt product; model X=trt product/solution; means trt product/hovtest; lsmeans trt product/pdiff adjust=tukey ; run; Thank you in advance, Alen
... View more
SAS 9 Content Assessment 2024.05 Released! Enhancements include the following:
The CommonRootPath variable has been removed from the SAS Content Assessment data model.
For the publish application, the --encrypt-sas option has been renamed --encode-sas for clarity.
A variable named objectId was added to the SAS Content Assessment data model.
The application usage application now supports SHA3-224 obfuscation.
The summarize SAS log steps application can process SAS Workspace Server and SAS Stored Process Server logs. The user IDs that executed the SAS code in these logs are provided, and these IDs are obfuscated using SHA3-224 encryption. The obfuscated user IDs are mapped to the original user IDs in the ASSESSMENT_RESULTSDIR directory, which is specified in the setenv.yaml file.
SAS Enterprise Miner project IDs are added to the CSV file used by the gather SAS code application.
Enhancements have been made, performance has improved, and issues have been addressed across the applications.
... View more