Actuarial Outpost Simple SAS Questions
 Register Blogs Wiki FAQ Calendar Search Today's Posts Mark Forums Read
 FlashChat Actuarial Discussion Preliminary Exams CAS/SOA Exams Cyberchat Around the World Suggestions

 Fill in a brief DW Simpson Registration Form to be contacted when new jobs meet your criteria.

#201
05-20-2015, 12:05 PM
 Pujols4Prez Member SOA AAA Join Date: Jul 2008 Posts: 12,718

Quote:
 Originally Posted by BassFreq I think that cannot be done in proc univariate. To get years in the x-axis, you would have to say "histogram years;". Then the only way to get the cashflows in would be to use them as a weight or frequency, but then you would have to ignore all negative cash flows. Is a histogram of cash flows really what you're looking for?
Probably not, but I am trying to work with the tools I have. I want to fit a curve to a set of cashflows (all positive) and display why I think that distribution is a good fit visually.
__________________
Hardwork is the crutch of the talent-less.

Quote:
 Originally Posted by Statatak what's a JAS
#202
05-20-2015, 01:52 PM
 BassFreq Member CAS Join Date: Jun 2003 Location: Chicago Studying for all eternity Favorite beer: Duff Posts: 1,706 Blog Entries: 2

If you want to fit a curve (as opposed to a predefined distribution), then you could try proc reg, genmod, gam, or loess, and use transformations of the year (year, year^2, log(year), etc) as regressors to predict the cash flows.
__________________
If at first you don't succeed, you have one data point.
Res ipsa loquitur, sed quid in infernos dicet?
#203
05-20-2015, 02:31 PM
 Pujols4Prez Member SOA AAA Join Date: Jul 2008 Posts: 12,718

Quote:
 Originally Posted by BassFreq If you want to fit a curve (as opposed to a predefined distribution), then you could try proc reg, genmod, gam, or loess, and use transformations of the year (year, year^2, log(year), etc) as regressors to predict the cash flows.
Yeah, I wanted to use proc reg but we don't have the SAS/STAT package. I might need to request purchasing it, but that is a lot of red tape.
__________________
Hardwork is the crutch of the talent-less.

Quote:
 Originally Posted by Statatak what's a JAS
#204
05-20-2015, 03:22 PM
 BassFreq Member CAS Join Date: Jun 2003 Location: Chicago Studying for all eternity Favorite beer: Duff Posts: 1,706 Blog Entries: 2

Quote:
 Originally Posted by Pujols4Prez Yeah, I wanted to use proc reg but we don't have the SAS/STAT package. I might need to request purchasing it, but that is a lot of red tape.
Given those circumstances, you might be better off summarizing the data in SAS, and then performing the curve fitting in R or or Excel.
__________________
If at first you don't succeed, you have one data point.
Res ipsa loquitur, sed quid in infernos dicet?
#205
06-06-2015, 10:26 PM
 ScottKelly Member SOA Join Date: Jul 2012 Posts: 299

#206
06-22-2015, 03:22 PM
 Actinium ad Infinitum SOA AAA Join Date: Jun 2015 Location: US Favorite beer: Coffee 24x7 Posts: 13

Quote:
 Originally Posted by T-roy I also have "The Little SAS Book" by Delwiche and Slaughter. It is nice to have this as a reference, although it is kinda vague and pretty basic.
"The Little SAS Book" is a good starter reference.
#207
06-22-2015, 03:25 PM
 Actinium ad Infinitum SOA AAA Join Date: Jun 2015 Location: US Favorite beer: Coffee 24x7 Posts: 13
Proc SQL

If you are doing a lot of Data Steps, you may want to consider using PROC SQL. In many cases, PROC SQL requires less coding and is more efficient.

Last edited by Actinium ad Infinitum; 06-22-2015 at 03:57 PM..
#208
10-18-2015, 03:11 PM
 ActSciMan Member CAS Join Date: Nov 2010 Studying for data science Posts: 1,859

Quote:
 Originally Posted by Actinium ad Infinitum If you are doing a lot of Data Steps, you may want to consider using PROC SQL. In many cases, PROC SQL requires less coding and is more efficient.
And, alternatively, in many other cases, the data step requires less coding and is more efficient.

The book Proc SQL by Example is good. He teaches you PROC SQL, but with just about everything he does, he shows you how to do the same thing with the data step, or explains that you can't and how close you can get, or shows you things you can't do with PROC SQL but can with the data step.
#209
08-11-2017, 05:22 PM
 SanctuS Member Join Date: Apr 2008 Posts: 63

I don't know if anyone will see this, but I have a question.

I inherited a 2 part process in SAS Enterprise Guide. If I run a step in Part 1 I define a directory as something like

Quote:
 %Let Butts = \\FILEPATH
Then in the second program in the process I import data into my work directory

Quote:
 Proc Import DATAFILE = "FILENAMES_ARE_FOR_NERDS" OUT = work.NERD_STUFF RUN;
Next step goes to look for that dataset, but I get errors:

Quote:
 DATA NERDS_FOREVER SET NERD_STUFF x RUN;
Get errors that say:
Quote:
 BUTTS.NERD_STUFF.DATA does not exist.
Somehow it's assigning the work directory to BUTTS, when it's intended to be the Temp directory.

If I run Part 1. Close SAS. Open SAS. Run Part 2. I get by with no issues.

Does anyone have any idea why SAS would not know how to find it's own work/temp directory and would look for BUTTS?
#210
08-11-2017, 05:32 PM
 MoralHazard Member CAS Join Date: Jul 2011 Favorite beer: Sam Adams Rebel Rouser Posts: 93

Is there an "options user=butts" somewhere in your code?