SherriF Tracker
https://communities.sas.com/kntur85557/tracker
SherriF TrackerSat, 20 Jul 2024 05:59:37 GMT2024-07-20T05:59:37ZDynamic regression models with external factors
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Dynamic-regression-models-with-external-factors/m-p/336365#M2162
<P>Hi,</P>
<P> </P>
<P>I am trying to program a regression model which includes multiple independent variables and a lagged dependent variable. It can be written as</P>
<P> Yt=a0 + a1*X1+a2*X2+a3*X3+a4*Yt-1</P>
<P>where Yt is predicted value at time t, X1-X4 are independent varibales, Yt-1 is the predicted value at time t-1, and a0-a4 are parameters.</P>
<P> </P>
<P>My questions is which proc statement I should use.</P>
<P> </P>
<P>Thanks,</P>
<P>Sherri</P>Mon, 27 Feb 2017 22:31:50 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Dynamic-regression-models-with-external-factors/m-p/336365#M2162SherriF2017-02-27T22:31:50ZTranspose a variable with matched info
https://communities.sas.com/t5/SAS-Data-Management/Transpose-a-variable-with-matched-info/m-p/252804#M6816
<P> </P>
<P>Hi,</P>
<P> </P>
<P>I want to transpose tables as shown below.</P>
<P> </P>
<P><IMG src="https://communities.sas.com/t5/image/serverpage/image-id/2081iEB2C03C71C3F6094/image-size/original?v=mpbl-1&px=-1" border="0" alt="Untitled picture.png" title="Untitled picture.png" /></P>
<P> </P>
<P>I want to transpose year to column, meanwhile make sure the material go with the year.</P>
<P> </P>
<P>I came up a way to do this is to contatenate year and material columns first, and then do simple transpose. Later on, i use scan() statement to seperate the joined column.</P>
<P>I think this approach is a little tedious. is there any other better way to get the same result?</P>
<P> </P>
<P>Thanks,</P>
<P> </P>Fri, 26 Feb 2016 19:49:58 GMThttps://communities.sas.com/t5/SAS-Data-Management/Transpose-a-variable-with-matched-info/m-p/252804#M6816SherriF2016-02-26T19:49:58ZRe: Data comparison
https://communities.sas.com/t5/SAS-Programming/Data-comparison/m-p/251414#M268766
Good resource! Thank you so much! Learned new stuff!!Sun, 21 Feb 2016 17:50:14 GMThttps://communities.sas.com/t5/SAS-Programming/Data-comparison/m-p/251414#M268766SherriF2016-02-21T17:50:14ZRe: Data comparison
https://communities.sas.com/t5/SAS-Programming/Data-comparison/m-p/251408#M268764
No, you didn't miss anything. You are right! I lost myself!!<BR /><BR />Thank you!<BR />SherriSun, 21 Feb 2016 16:12:50 GMThttps://communities.sas.com/t5/SAS-Programming/Data-comparison/m-p/251408#M268764SherriF2016-02-21T16:12:50ZData comparison
https://communities.sas.com/t5/SAS-Programming/Data-comparison/m-p/251358#M268761
<P>Hi,</P>
<P> </P>
<P>I have two data sets. One containes a list of formal fortuen 500 companies' name. The other contains patent information for a lot of companies which are extracted online, so the format of the companies' name may differ from the first data set, even if they refer to the same company. </P>
<P> </P>
<P>What I wanted to do is to select out the patent information for the companies who are among the fortune 500 companies. So, I have to compare the compare the names between the two data sets. I used soundslike (=*) statemete, and treat each of the fortune 500 companies as a macro variable. As the follwoing code shows:</P>
<P> </P>
<P>data _null_;<BR /> set company0;<BR /> suffix=put(_n_,5.);<BR /> call symput(cats('company',suffix), company);<BR />run;</P>
<P> </P>
<P>data selected_patent;<BR /> set patent0;<BR /> where organization_name =* "&company1.";<BR /> company=put("&company1.", 25.);<BR />run;</P>
<P> </P>
<P>&company1. stands for the one of the fortune companies, but I have 500 macro variables like this. </P>
<P> </P>
<P>one way I can think of is to run macro program, but I have to list 500 call statement for macro program!!!!!!</P>
<P> </P>
<P>Is there any easy way to finish this task, instead of using calling macro program for 500 times?</P>
<P> </P>
<P>Thanks,</P>
<P>Sherri</P>Sat, 20 Feb 2016 22:43:46 GMThttps://communities.sas.com/t5/SAS-Programming/Data-comparison/m-p/251358#M268761SherriF2016-02-20T22:43:46ZRe: PCTL function with a large amount of variables
https://communities.sas.com/t5/SAS-Programming/PCTL-function-with-a-large-amount-of-variables/m-p/232813#M42448
<P>Thank you for your link. It is helpful.</P>
<P> </P>
<P>After I tried several list methods, It turnes out the function can be written as x=PCTL(i, of variable:) and it worked.</P>
<P> </P>
<P>The reason I dont prefer transpose process is because I am personally not familiar with it, and the data I am manipulating is very complicated alrealy for me, so in order to keep my logic clear for myself, I prefer this PCTL function.</P>
<P> </P>
<P>Thank you for your help again!</P>
<P> </P>
<P> </P>
<P> </P>Mon, 02 Nov 2015 21:09:01 GMThttps://communities.sas.com/t5/SAS-Programming/PCTL-function-with-a-large-amount-of-variables/m-p/232813#M42448SherriF2015-11-02T21:09:01ZRe: PCTL function with a large amount of variables
https://communities.sas.com/t5/SAS-Programming/PCTL-function-with-a-large-amount-of-variables/m-p/232807#M42446
<P><SPAN>Thank you for you response.</SPAN><BR /><SPAN>The variables' name look like this: load_2004,load_2005,load_2006,load_2007,load_2008,</SPAN><WBR /><SPAN>load_2009, l3r1-l3r100,l4r1-l4r100,l5r1-l5r100,l6r1-l6r100;</SPAN><BR /><SPAN>I can probably do transpose process, but i am not familiar with that and it will easily mess up my data set. I am still wondering if this can be solved with PCTL function.</SPAN></P>Mon, 02 Nov 2015 20:39:08 GMThttps://communities.sas.com/t5/SAS-Programming/PCTL-function-with-a-large-amount-of-variables/m-p/232807#M42446SherriF2015-11-02T20:39:08ZRe: PCTL function with a large amount of variables
https://communities.sas.com/t5/SAS-Programming/PCTL-function-with-a-large-amount-of-variables/m-p/232806#M42445
Thank you for you response.<BR />The variables' name look like this: load_2004,load_2005,load_2006,load_2007,load_2008,load_2009, l3r1-l3r100,l4r1-l4r100,l5r1-l5r100,l6r1-l6r100;<BR /> I can probably do transpose process, but i am not familiar with that and it will easily mess up my data set. I am still wondering if this can be solved with PCTL function.Mon, 02 Nov 2015 20:38:37 GMThttps://communities.sas.com/t5/SAS-Programming/PCTL-function-with-a-large-amount-of-variables/m-p/232806#M42445SherriF2015-11-02T20:38:37ZPCTL function with a large amount of variables
https://communities.sas.com/t5/SAS-Programming/PCTL-function-with-a-large-amount-of-variables/m-p/232803#M42442
<P>Hi,</P>
<P> </P>
<P>I am using X=PCTL(I,variable1, variable2, variable3....) function to calculate percentiles, but I want to calculate percnetiles among 600 variables. </P>
<P> </P>
<P>is there anyway that i can simpelize the expression instead of listing every variable in the bracket?? That would be crazy!</P>
<P> </P>
<P>Thanks,</P>
<P>Sherri </P>
<P> </P>Mon, 02 Nov 2015 20:21:37 GMThttps://communities.sas.com/t5/SAS-Programming/PCTL-function-with-a-large-amount-of-variables/m-p/232803#M42442SherriF2015-11-02T20:21:37ZRe: Nonlinear qunatile regression
https://communities.sas.com/t5/Statistical-Procedures/Nonlinear-qunatile-regression/m-p/232427#M12231
<P>Hi StevenDenham,</P><P> </P><P>I solved my problem by tranforming the specific model into a linear model by your hint in the parenthesis.</P><P> </P><P>Thank you!</P><P> </P><P>Sherri </P>Fri, 30 Oct 2015 13:56:44 GMThttps://communities.sas.com/t5/Statistical-Procedures/Nonlinear-qunatile-regression/m-p/232427#M12231SherriF2015-10-30T13:56:44ZRe: Nonlinear qunatile regression
https://communities.sas.com/t5/Statistical-Procedures/Nonlinear-qunatile-regression/m-p/232424#M12229
<P>Hi Ivm,</P><P> </P><P>Thank you for your detail answer. It is interesting and really a good learning material!</P><P> </P><P>Thanks,</P><P>Sherri</P>Fri, 30 Oct 2015 13:51:58 GMThttps://communities.sas.com/t5/Statistical-Procedures/Nonlinear-qunatile-regression/m-p/232424#M12229SherriF2015-10-30T13:51:58ZNonlinear qunatile regression
https://communities.sas.com/t5/Statistical-Procedures/Nonlinear-qunatile-regression/m-p/232075#M12204
<P>Hi,</P><P> </P><P>Is SAS capable to run nonlinear quantile regression?</P><P>Especially, I have three parameters needed to be estimated.</P><P> </P><P>I saw several quantile regression samples, but all of them are using general regression models. </P><P>Is there any way I can use <EM>proc quantreg</EM> with <EM>nonlinear models</EM> to estimate <EM>three parameter variables</EM>?</P><P> </P><P>Thanks,</P><P> </P><P> </P><P> </P>Wed, 28 Oct 2015 16:47:03 GMThttps://communities.sas.com/t5/Statistical-Procedures/Nonlinear-qunatile-regression/m-p/232075#M12204SherriF2015-10-28T16:47:03Z