Relative Content

Tag Archive for sas

SAS compare month to month when the dataset has monthly figures across columns

I have list of firms (gvkey) and years (fyear). Per each firm-year observation, I have monthly sales across columns (columns sale_1 through sale_12 for January sales to December sales). I’d like to compare sales every month (e.g., January to February, February to March and so on) and create 11 set of variables for each difference (e.g., diff_2=sale_2-sale_1 and so on). Is there array or do loop I can use to create these variables instead of writing diff_2 through diff_12?

How to perform a T-Test with specific null hypothesis

I have scoured the internet and read the docs looking for an answer to this problem to no avail. I just want to be able to use the SAS TTEST proc for a two-sample T-Test but where the null hypothesis being that the difference between the two means is less than or equal to a certain value.

SAS Informat: What does an informat 3. mean?

I have the below example SAS code, which output ht2 using input with informat 3. My understanding of ht2 =INPUT(ht,3.) is that ht will be output if has 3 digits (including decimal). But instead in the below code all of ht2 are missing.