Help! how to calculate succeeding cumulative sum for each record
I have minute by minute data for the stock index futures. Variables are Date, Time, Thprice(theoretic price by model), Rprcie(real trading price), rate(interest rate), maturity, Signal(+1 stands for...
View ArticleCreate unique variable names in macro
Hi I have a functioning macro running through daily datasets. The macro itself works as it should and I get the outputs I want. I would however like for SAS to save the files it generates as...
View Articlejoin several tables while computing an average of variable´values
Hey all, could you please help me to solve the following problem: I have several tables (say, T is a number of tables) with data of such a view: Y X1 X2 X3 ...Xi with different (numeric) values for...
View ArticleAggregate data in 1 minute bars
Hi I have been looking at many ways of aggregating data, but none seem to fit on the dataset I have. See below. What I would like to do is aggregate the data based on 1 minute time bars. The time...
View ArticleLeading Zeros: NotePad; Excel; SAS
Hello, I have a dataset saved as 'txt'. It is composed of four variables, a mix of numeric and character, '|' delimited. I am trying to import this file into SAS. Issue: I have a variable within these...
View ArticleMissing vars-simple ques
I Have coded all my variables for analysis. Some variables had missing values which are now coded to missing=x. When running chisq and fisher 2x2 tables should these be included or should they be set...
View Articlepick one data every 5 minutes interval
Hello all, I have attached the file I am working on. I need to pick one data every 5 minutes interval. If there is no data in the interval, then I need it still report the previous one. For example:...
View ArticleSas Retain first occurrence
Hi, I'm working with long format data from an educational psychology study. I have the following setup: Multiple observations per ID, each with a 'status' variable and a 'date' variable. For example:...
View ArticlePROC BOXPLOT with ODS GRAPHICS
Hello all, when running proc boxplot with ods graphics on, there appears to be a default title "DISTRIBUTION of VAR1 by VAR2". Anybody know how to suppress this title? For example: Code: data test;...
View ArticleHow to obtain p value for OLS equation.
Hello, this is my first post here. I have made a Single Nonlinear Equation (OLS) but I can only get the p-values for the parameters, but not for the whole equation. Can anyone help?
View ArticleShare your SAS tips
Since SAS isn't as reliant on UDFs as much as R is, I thought a thread on tips/useful gems hidden in SAS documentation/stuff you learned would be more appropriate than a thread on functions. So, share...
View ArticleExport certain datasets as csv from macro
Hi I have a functioning macro that creates a list of datasets from a master file that is unique for each day. The datasets I create in the SAS macro therefore have the data added to them so they are...
View ArticleInstallation of sas 9.0
How to configure SAS 9.0 and sas enterprise guide 4.1. Every time i install both of them and run enterprise guide it shows unable to connect to repository?
View ArticleReplace charts and tables with custom images
Hello all: I'm interested in knowing if there is a way to insert images into charts and graphs (NOT as backgrounds). For example, instead of having just a simple bar chart, is there a way to have the...
View Article[SOLVED] SAS - If then Macro (easy one)
I am the self-annointed worst macro writer. I am looking to have the following if then repeated for wide data to cover all diag1-54. Here is the current code: Code: data Diag_Trauma_Trunc; set...
View ArticlePrinting the variables names in the output
I have the following program in SAS: Is there a way to create an output where I can see the variable names displayed for gender? I'd like to see the average for buy by gender. But when I run proc means...
View ArticleHow to move a SAS dataset with formats (stored in a sas7bcat library) to...
Hi, How can I move a SAS dataset (all numeric variables) with formats (manually defined for 470 variables and saved within a SAS library file) to Stata ?? SAS Institute sent me this super-complex...
View ArticlePROC Glimmix - need help with interpretations of the results
Hello I ran PROC Glimmix to fit a generalized mixed model for an ordinal response with 6 categories. I have one fixed effect T (treatment) with 3 levels, one of them is the one of interest vs. two...
View ArticleA few basic questions
Hello, I'm just getting started with sas and wondering if someone can give me some tips. I have the 3 data lines below. I'd like to programmatically calculate descriptive statistics for each of the 2...
View Articlehow to read an formated excel file?
Dear all:When I read an excel file with formated datetime with proc import process, I can only get the date part, the tim parts were lost. How to read the excel file with the full datetime? My sample...
View Article