# sas

1. ### SA ETS - Date Variable

Hello, In order for the SAS ETS procedures to work there should be a date variable in the data set. This variable must be equally spaced. If there are missing values we should place the ".". If there are non working days e.g. weekends then we should not include any dates that correspond to...
2. ### SAS Macro problem (ERROR 22-322)

Hi all, I'm a new member and I need your help!!! I have the following macro %macro test ( lib, outfile, file,var, value=); OPTIONS NOTES SOURCE SOURCE2 MPRINT MLOGIC MERROR ; data &lib..&outfile; set data = &lib..&file; where &var="&value"; run; %mend test; but when I...
3. ### SAS to MATLAB

Hi, I have a large SAS code which I need to translate to MATLAB code. So I have two questions. Is there any easy way of porting SAS code to MATLAB? As the chances of the prior question is slim; What is the easiest way of getting an overview of the syntax and commands of SAS. Is there...
4. ### excel to SAS

library work 'c:\documents and settings\desktop\s' data s.sas; infile 'C:\Documents and Settings\Desktop\sas.prn' firstobs=2; input subject salary job jobtitle $yrsatjob gender age manager$; run; I cannot get this code to read in an excel sheet into SAS. I am saving it as a space...
5. ### Help with Loess Statement in Proc Sgplot

Hi Here is my code. It is to graph the results of a loess curve using proc sgplot title1 "Loess Curve of Loudness Ratings by Ear"; proc sgplot data=tms514.first; scatter x=s_count y=log_rat/group=ipsi_con; xaxis label='TMS Session in Time Order' grid values=(1 to 26 by 1); loess...
6. ### proc power onewayanova

Nevermind, I was not getting any responses :(
7. ### SAS programmer needed for a 12 month contract

Sas programmer needed for a 12 month contract based in Germany. Previous pharmaceutical experience required, the client is an international pharmaceutical compant offering competitive rates. Referral fee available for anyone we place. If this maybe on interest please send your CV to...
8. ### Absolute Beginners Question: Problem with importing csv file

Hello everyone, I am just getting started on SAS, but cannot even get past the first step in my tutorial :( Excel-Import does not work, so i am trying to import a .csv file. It does import the data, the only problem is that instead of my dataset looking like this var1 var2 var3 1 1...
9. ### PROC MIXED - To analyze cluster randomized trial

Hi All, I have a query regarding how to analyze a cluster randomized trial. in the trial, even though the unit of randomization is the cluster, unit of analysis is the patient. The study had clinics that were randomized as either intervention or no intervention. so patients in intevention...
10. ### Error message in PROC MDC (Nested Logit Model)

Hi everyone, I've been trying to run PROC MDC in SAS for several days and always get the same error message, please help me! Basically, my goal is to run a nested logit model for a dependent variable called "pleasantness", with, for the moment, three explanatory dummy variables (and maybe more...
11. ### Help with Nested ANOVA model selection using SAS

Hello, I would like some help with selecting the appropriate model for a nested ANOVA using SAS. I have a data set with d15n as the response variable and year, grid and station as class variables. I sampled over two years and sampled from in the same three grids in each year, but in each...
12. ### Shapley Value in SAS

Hi! Does anyone know how to calculate Shapley Value in SAS ? I found a macro that does that, but I don't manage to use it correctly. Any tips would be greatly appreciated. /Lauren
13. ### Array problem

Hello all! :wave: Thanks for any help you might have. I've got a dataset with repeated measures for each medical ICD-9 code, and I need to make it such that the data is one row per person. For example (this isn't actually my data): What I have now: Kelly 745.5 Kelly 747.0...
14. ### Industry-Year regressions - excluding observations - need advice

Hello, I am trying to run firm-year specific regressions in SAS to get to an expected value for industry-year. However, I need to exclude the i'th observation. For example, if there are 20 observations for 1995 for a specific industry (IND), the regression for obs 1 would be based on obs...
15. ### Using Proc SQL within a SAS Macro

Hello, I am an amateur SAS programmer. I just encountered a problem using the Proc SQL statement within a macro. I am using the Proc SQL to connect to the orcle database and pull out a value from a table. I am posting the code that I have written below. Any help will be greatly appreciated...
16. ### PROC COUNTREG Help

I'm running PROC COUNTREG for count data (n~6800) and that is fine. But when I try to run the model for subgroups with the "by" option, one of the two categories shows nulls for the _Alpha parameter, and the log says the Hessian matrix is singular. The variables do not have high collinearity (I...
17. ### DF in Repeated Measures ANOVA

Hi all! :wave: In advance: thank you to all those who take the time to even read this post, as well as answer it: Additional to my sunfish study (I talked about in previous posts) I am also conducting a restoration project dealing with treatment and control sites over multiple years. I...
18. ### Question about finding MLE asymptotic standard error in AR(1)-garch(3,1) model in SAS

The AR(1)-GARCH(3,1) model is as follows: Y(t) = e(t) - phi * Y(t-1) ---> AR(1), where phi is the parameter e(t) = sqrt(h(t)) * error(t) ---> error(t) follows N(0,1) iid h(t) = w + alpha * [e(t-1)**2] + gamma1 * h(t-1) + gamma2 * h(t-2) + gamma3 * h(t-3) ---> GARCH(3,1), where w, alpha...