+ Reply to Thread
Results 1 to 3 of 3

Thread: t-stats

  1. #1
    Points: 2,101, Level: 27
    Level completed: 68%, Points required for next Level: 49

    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy t-stats



    Hi. When using proc reg, I get the coefficients, SE, t-stats, and p-values on one line. Is there any way to get the t-stats to show below the coefficients?

    It takes me a long time to put the t-stats under the coefficients when I tranfer the output to Excel.

    Thanks, Deep.

  2. #2
    TS Contributor
    Points: 6,942, Level: 54
    Level completed: 96%, Points required for next Level: 8

    Posts
    782
    Thanks
    0
    Thanked 71 Times in 70 Posts
    I'm no expert; I would use the ODS statements, then manipulate the output in data steps. Something like this, maybe it's helpful for what you need:

    *Create a dataset with the SAS output*;
    ods output ParameterEstimates=parest;

    proc reg;
    model weight=height age; *INSERT YOUR OWN MODEL HERE*;
    run; quit;
    *Given a model with n explanatory variables, the dataset PAREST will have n+1 records*
    *The n explanatory records + Intercept*;

    *Prepare the output for outputting to Excel*;
    data prepared;
    set parest;
    *For each record: Output one line with Estimate/StdErr*;
    var1=Estimate;
    var2=StdErr;
    output;
    *And another line with t-stats*;
    var1=tValue;
    var2=Probt;
    output;
    run;
    *dataset PREPARED will have 2(n+1) records*;

    proc print data=prepared;
    var Variable df var1 var2;
    title "Is this better?";
    run;

  3. #3
    Points: 2,101, Level: 27
    Level completed: 68%, Points required for next Level: 49

    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile t-stats


    Thanks Mean Joe. This is a lot better.
    The only thing is that ParameterEstimates had to be all in lower case for it to work.

    Deep.

+ Reply to Thread

Similar Threads

  1. Help with stats
    By chancy in forum Statistics
    Replies: 1
    Last Post: 04-26-2010, 11:47 AM
  2. New to Stats, Can someone help me out?
    By cm1395 in forum Statistics
    Replies: 1
    Last Post: 04-12-2010, 11:54 PM
  3. Stats Help Please
    By nyr35 in forum Statistics
    Replies: 0
    Last Post: 02-26-2009, 04:54 PM
  4. am i using the right stats?
    By miss moss in forum Statistics
    Replies: 1
    Last Post: 09-03-2007, 10:29 AM
  5. I need help with stats
    By Jessie in forum Statistics
    Replies: 1
    Last Post: 10-16-2006, 11:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts








Advertise on Talk Stats