
10-09-2015
ets_kps
SAS Employee
Member since
07-23-2012
- 89 Posts
- 1 Likes Given
- 6 Solutions
- 49 Likes Received
-
Latest posts by ets_kps
Subject Views Posted 1687 09-25-2015 03:12 PM 1852 08-25-2015 04:51 PM 1852 08-25-2015 04:49 PM 9678 08-25-2015 03:37 PM 9734 08-24-2015 05:29 PM 2075 08-13-2015 11:56 AM 3226 08-13-2015 11:52 AM 3392 08-12-2015 10:54 AM 3392 08-11-2015 04:46 PM 3392 08-10-2015 01:58 PM -
Activity Feed for ets_kps
- Got a Like for Re: poisson regression using sas. 04-16-2020 04:13 PM
- Got a Like for Re: Proc Similarity to cluster time series data. 04-09-2017 10:27 PM
- Posted Re: Interval option in MARKETDATA (RiskDimension) on SAS Forecasting and Econometrics. 09-25-2015 03:12 PM
- Got a Like for Re: Help needed to model the impact of a long term promotional tactic on sales. 09-01-2015 04:24 AM
- Got a Like for Re: Proc Autoreg -- autoregressive parameters assumed given. 09-01-2015 04:24 AM
- Got a Like for Re: SAS/STAT procedure to calculate before and after performance analysis?. 09-01-2015 04:24 AM
- Got a Like for Re: Predicting the rank of a candidate on a party list - Help requested. 09-01-2015 04:24 AM
- Got a Like for Re: 2-stage regression with more than 2 models. 09-01-2015 04:24 AM
- Got a Like for Re: Logistic Regression with Instrumental Variable. 09-01-2015 04:24 AM
- Got a Like for Re: Estimating a Consumption-Based Asset Pricing Model. 09-01-2015 04:24 AM
- Got a Like for Re: Implying white's (1980) correction at proc panel procedure. 09-01-2015 04:24 AM
- Got a Like for Re: Selecting the Correct Forecasting/Prediction Proc (Feb-Dec year 1, Jan-Mar year 2). 09-01-2015 04:24 AM
- Got a Like for Re: proc varmax. 09-01-2015 04:24 AM
- Got a Like for Re: Proc ESM Seasonal Model Help. 09-01-2015 04:24 AM
- Got a Like for Re: Proc Panel and Parks. 09-01-2015 04:24 AM
- Posted Re: proc panel and heteroscedasticity correction on Statistical Procedures. 08-25-2015 04:51 PM
- Posted Re: proc panel and heteroscedasticity correction on Statistical Procedures. 08-25-2015 04:49 PM
- Posted Re: PROC IMPORT from Web on SAS Procedures. 08-25-2015 03:37 PM
- Posted PROC IMPORT from Web on SAS Procedures. 08-24-2015 05:29 PM
- Posted Re: 2-stage least squares regression on Statistical Procedures. 08-13-2015 11:56 AM
-
Posts I Liked
Subject Likes Author Latest Post 1 -
My Liked Posts
Subject Likes Posted 1 08-10-2015 01:58 PM 1 06-12-2014 11:33 AM 3 03-11-2013 11:18 AM 4 11-12-2012 10:01 AM 3 11-05-2013 04:25 PM -
My Library Contributions
Subject Likes Author Latest Post 0 1
11-10-2014
10:50 AM
There is strong evidence that a is not equal to b based on what you have posted. AKA "A and B are different" Now, I see that you are estimating these parameters with GMM so this might be some sort of complicated system. For that reason I cannot make any comment on the usefulness or appropriateness of this test statistic as I don't have much context. Good luck-Ken
... View more
11-10-2014
10:32 AM
Hi Sunny, The closest we have to this in SAS is utilizing item stores for models estimated by certain models. Here is an example. %let nObs = 5000; %let nVars = 100; data SimuData; array x{&nVars}; do obsNum=1 to &nObs; do j=1 to &nVars; x{j}=ranuni(1); end; linp = 10 + 11*x1 - 10*sqrt(x2) + 2/x3 - 8*exp(x4) + 7*x5*x5 - 6*x6**1.5 + 5*log(x7) - 4*sin(3.14*x8) + 3*x9 - 2*x10; TrueProb = 1/(1+exp(-linp)); if ranuni(1) < TrueProb then y=1; else y=0; output; end; run; proc logistic data=SimuData; effect splines = spline(x1-x&nVars/separate); model y = splines/selection=stepwise; store sasuser.SimuModel; run; data test; array x{&nVars}; do j=1 to &nVars; x{j}=0.15; end; drop j; output; run; proc plm restore=sasuser.SimuModel; score data=test out=testout predicted / ilink; run; data testout; set testout(drop=x1-x&nVars); run; proc print data=testout; run; You can find other examples here. SAS/STAT 13.2 User's Guide Example Programs (Sample Library)
... View more
10-03-2014
11:05 AM
Hi Niam, Thanks for your question. You seem to have two distinct wants for your model. The first, and your primary research question seems to be whether funding influences publications. If that is the case, then your FE estimate with the university type dropped is effectively controlling for the university type and all other idiosyncratic confounding effects specific to the professor. So your estimates, assuming the modeling specified correctly, should be consistent. If you are interested in the marginal effect of type and you want to still control for some idiosyncratic professor effect, you will need to relax some of the assumptions on the way that university type interacts with professor specific effects. If willing to do this, you can employ another estimator known as a Hausman-Taylor estimator. Currently we do not have super convenient access to this estimator in ETS (but look for it soon ). In the meantime, if you look at this document, page 210 http://eco.cueb.edu.cn/upload/2012/9/616432590.pdf then you will see how to estimate this in SAS. It is a multistep process. You can also find IML code here. Copyright C 2012 by R. Carter Hill and Randall C. Campbell "Using SAS for Econometrics" by R. Carter Hill and Randall C. Campbell (2012) John Wiley and Sons, Inc Chapter 15 Again, the key assumption for this model to make sense is that there is no correlation between the individual professor characteristics and the university type (which seems a little implausible to me though this is your call) Best of luck-Ken
... View more
09-24-2014
01:02 PM
3 Likes
A very good question and thanks for bringing it to us. You indeed have panel data and it is likely that PROC PANEL contains some estimators that will help you find the impact of the campaign (both calls and coupon size). Since it appears you only have information on customers using coupons, you will likely only be able to estimate the impact of changing the coupon size. But that should be ok. Now for the hard part. If you are willing to assume away any autoregressive process and are willing to assume the impact of the program is say, 3 periods, then create three lagged values of coupon, include those as regressors and estimate a two-way fixed effect model. The general syntax could be found here. SAS/ETS(R) 13.2 User's Guide However, if you are unwilling to make that assumption (no serial correlation), then you have to move to a more complicated estimator to get consistent estimates. An example of that can be found here. SAS/ETS(R) 13.2 User's Guide As a first, pass I would try my first recommendation. Best of luck.
... View more
09-18-2014
12:59 PM
3 Likes
Beyond the example itself, what would you like explained? I would refer you to the references for the theoretical underpinning. The model itself is ITGMM which is a method of consistently estimating parameters in the presence of endogenous regressors. Watch this video for an explanation. What is Generalized Method of Moments? by Alastair Hall - YouTube
... View more
09-18-2014
12:39 PM
1 Like
Hello, This is a tough question to answer with the limited information I have. I'll do my best to give you some ideas. First, if you have sales history of lots of drugs you might want to consider some version of an implementation of forecasting by analogy. This link might help you get started. http://www.forecasters.org/submissions08/TroveroMicheleLeonardMichaelISF2008.pdf The algorithmic methods rely heavily on a procedure called SIMILARITY http://support.sas.com/documentation/cdl/en/etsug/67525/HTML/default/viewer.htm#etsug_similarity_examples.htm As far as what to do with your forecast, that is another question altogether. I assume you want to do some sort of optimization. And there are multitudes of different objective functions with constraints. This would really require a closer look at the problem. Please email me directly should you like some assistance with this. Kenneth.sanford@sas.com
... View more
07-29-2014
05:07 PM
Hi Surak, You seem to have identified some of the issues. May I ask whether you have tried different optimizers? SAS/ETS(R) 13.1 User's Guide Also, which version of ETS are you working with? There have been MAJOR improvements to the speed and likelihood of convergence in VARMAX in recent releases (12.3 or later) Also, have you tried the METHOD=LS option with your MA term? Thanks-Ken
... View more
07-25-2014
01:44 PM
While installing the newer version on your machine will guarantee access to all your products, if you download this, you can try running your code on the newest versions right now. Free Statistical Software, SAS University Edition | SAS
... View more
06-17-2014
05:14 PM
3 Likes
Hi Niam, Actually this was true prior to the latest release of ETS. As of the 13.1 release QLIM supports a number of models with RHS endogenous regressors, including logit and probit models. Please see this documentation and let me know you would like any help using it. SAS/ETS(R) 13.1 User's Guide Ken
... View more
06-17-2014
01:12 PM
Hi, I included maxiter=0 because I wanted the estimates to be OLS and that is what the optimizer uses as initial values. Ideally I would have sent you to PROC REG but I couldn't find how to easily do class variables. Feel free to use any tool that uses OLS. Ken
... View more
06-16-2014
02:03 PM
You can use any PROC you wish, this is a conceptual problem and not a tool problem. For simplicity, you might want to use PROC MIXED or GLM though. See this note SAS/ETS(R) 13.1 User's Guide If you want to use a Fixed Effects (FE) strategy to control for time and firm level heterogeneity, you are going to have some issues with such sparse data. Here is the strategy I would use, proc qlim data=tmp1.x ; class year ;model car5 = bm mv roa dy year / noint;nloptions maxiter=0; run; This is effectively creating a Dummy for each time and for each cross section. Given that you only have one observation in some cross-sections you need to omit an intercept to get anything that makes sense. Personally I think you should probably consider a Random Effects strategy for estimation because of your data problems. (PROC MIXED) Hope this helps.
... View more
06-16-2014
11:21 AM
3 Likes
Hi Ksharp, The ESM procedure uses a lead= option rather than a score statement. you can see the syntax here. SAS/ETS(R) 13.1 User's Guide Let us know if you need any help. -Ken
... View more
06-13-2014
01:16 PM
what does the log file say? I see a bunch of issues. First, your dependent variable is almost always missing. That dep variable name is car5 but you call it car in the syntax. Other than that, it looks ok as long as the data are sorted. What do the other variables mean? Happy to help if you provide some additional info. Thanks-Ken
... View more
06-13-2014
11:33 AM
Hello, Here is how you request the variance decomposition from the procedure. It gives you the within and between variation for the VC model. You can grab this example and run it in SAS. Also, to get the full output from the procedure, simply delete the line "ods select VarianceComponents". I included it to keep your output as small as possible. data greene; input firm year production cost @@; datalines; 1 1955 5.36598 1.14867 1 1960 6.03787 1.45185 1 1965 6.37673 1.52257 1 1970 6.93245 1.76627 2 1955 6.54535 1.35041 2 1960 6.69827 1.71109 2 1965 7.40245 2.09519 2 1970 7.82644 2.39480 3 1955 8.07153 2.94628 3 1960 8.47679 3.25967 3 1965 8.66923 3.47952 3 1970 9.13508 3.71795 4 1955 8.64259 3.56187 4 1960 8.93748 3.93400 4 1965 9.23073 4.11161 4 1970 9.52530 4.35523 5 1955 8.69951 3.50116 5 1960 9.01457 3.68998 5 1965 9.04594 3.76410 5 1970 9.21074 4.05573 6 1955 9.37552 4.29114 6 1960 9.65188 4.59356 6 1965 10.21163 4.93361 6 1970 10.34039 5.25520 ; proc sort data=greene; by firm year; run; proc panel data=greene ; model cost = production / rantwo vcomp = fb ; ods select VarianceComponents; id firm year; run;
... View more
06-12-2014
11:33 AM
1 Like
Hello, I assume you are following this example SAS/ETS User's Guide Example Programs. As you can see, after SIMILARITY gives you the similarity matrix, then you can cluster in the same way you would use cross sectional clustering routines. Use PROC CORR, CLUSTER, whatever you wish. Similarity has a number of utilities but all are related to temporal ordering. Typical methods of clustering ignore the ordering. In the time series version of this clustering we are looking for variables(series) that we can treat as a group, rather than observations that we treat as a group. The SIMILARITY procedure effectively transposes this information (with some other tweaks) so the clustering can be done on the variables. If you were to use clustering directly (a perfectly sensible practice for some uses) then you would effectively be looking for intervals that behave similarly. This might be perfectly reasonable for some sort of time series segmentation but that is not what we are showing in this example. Hope this helps-Ken
... View more