Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Sastronaut

    Input Statement with multiple observations per record

    sorry...here's the full code: data prices; input date mmddyy10. price: 8.2 volume: 8. price2: 8.2 volume2: 8.; cards; 03/25/2005 15.78 1000 1.88 1500 09/05/2006 10.88 2000 0.77 2500 ; run; data prices(drop=price2 volume2); set prices(keep=date price volume) prices(in=b keep=date...
  2. Sastronaut

    Input Statement with multiple observations per record

    I'm no wiz with compound input statements, but the following will work: data prices(drop=price2 volume2); set prices(keep=date price volume) prices(in=b keep=date price2 volume2); if b then do; price = price2; volume = volume2; end; run;
  3. Sastronaut

    How to fit GARCH(1,1) with targeted unconditional variance? Thanks!

    Have you looked into proc arima...I know you can fit GARCH models with arima.
  4. Sastronaut

    Proc Logistic

    %let Varlist=c1,f,g,r..etc I do have some fixed variables, I would make them as macro variables. will that work? here are my code, correct me if i am wrong. I need some explanation too. %macro logisitic(); %let Varlist = c1 c2 c3 ... c100; /*all of my 100 predictors aren't of the order c1, c2...
  5. Sastronaut

    Proc Logistic

    proc logistic doesn't have an option to cycle through variable names...but you can use a macro, all you need is a macro variable with all the var names you want to test (Varlist): %macro logisitic(); %let Varlist = c1 c2 c3 ... c100; %let i = 1; %let CurrVar = %scan(&Varlist., &i.); %do %until...
  6. Sastronaut

    proc npar1way

    your code looks correct, sounds like you don't have a license for SAS/STAT...to find out, type in proc setinit; run; and look for SAS/STAT in the list of SAS products your company is licnesed to use.
  7. Sastronaut

    Compute Statistics for $char Variables

    Use a chi-square test... proc freq data=yourdata; tables var1 * var2 / chisq; run; generally a p-value < 0.05 means there is a statistically significant difference in the category frequencies of the variables being tested.
  8. Sastronaut

    Substr problem

    hi kdt82, just tried it one day years ago and it worked
  9. Sastronaut

    Substr problem

    kdt82, FYI - the code i posted works perfectly in SAS. there is no do/end required for daisy chaining if then if then statements like that.
  10. Sastronaut

    Substr problem

    check the actual length of region1, if it is 7 or less then you will get an error. try using a condition to check the length before the conditional statement RegLen = length(Region1); if reglen > 7 then if substr(Region1,RegLen-7,8) = "Division" then Region2 = cat(Region1," Support");
  11. Sastronaut

    Question about GENMOD Output

    any book on generalized linear models for sas would do. why are you using the gamma distribution, are you modeling a sum of normal random variates?
  12. Sastronaut

    Question about GENMOD Output

    what link function are you using? can you post a sample of the output?
  13. Sastronaut

    how to create a simulation variable in a specific range

    Here's one thing you can try....specify a larger standard deviation and discard the outliers. The shaprio-wilkes test for normality has a very high p-value (>.95) indicating perfect normality: data sim; do i=1 to 1000; x = rand('NORMAL', 25500, 10000); if 1000 <= x <= 50000 then output; end...
  14. Sastronaut

    how to create a simulation variable in a specific range

    i would specify a mean of 25,500 (50000/2 + 1000/2) and a standard deviation big enough to spread the random variates from 1000 to 50000. An SD aroud 8000 will get you in the ballpark, but to my knowledge there's no way to restrict random variates in SAS to a specified range. You can discard the...
  15. Sastronaut

    how to create a simulation variable in a specific range

    Use the rand function: x = RAND('NORMAL',Mean, Standard deviation)
  16. Sastronaut

    Replace Missing Values

    data have2; set have; retain userid2; if userid ne '' then userid2 = userid; run;
  17. Sastronaut

    ODS cutting off var names in regression output

    the namelen = 32 option in the proc statement does the trick.
  18. Sastronaut

    ODS cutting off var names in regression output

    I'm using ODS to output parameter estimates from proc logistic to an output data set. ODS is truncating my variable names to 20 characters. Anyone know a work-around for this? proc template perhaps? data x; DO I=1 TO 1000; THIS_VAR_IS_EXACTLY_28_CHARS = RANUNI(1); DEPVAR = (RANUNI(2) < .25)...
  19. Sastronaut

    Enhanced Editor on UNIX?

    ok, do you want to run your sas programs in batch mode or interactve...i'm not sure what distinction you are making regarding the enhanced editor, do you want to be able to see you log, output, run programs, code segments in the same editor? if you are talking about interactive mode under unix...
  20. Sastronaut

    HELP: Write to WORK.'#tf0174'n.UTILITY failed..?

    chris - just out of curiousity why do you think tagsort doesn't work well?

Part and Inventory Search

Back
Top