Help using Base SAS procedures

Why am I getting a t-value = infinity in linear regression

Reply
New Contributor
Posts: 4

Why am I getting a t-value = infinity in linear regression

I'm trying to understand why I'm getting a negative t-value for regression analyses run out of proc surveyreg. It's a very large dataset, when I stratify by age/sex, I get these results for some of my associations, with either one or two predictors in the model.

Any clues would be helpful!

Thanks
Occasional Contributor
Posts: 6

Re: Why am I getting a t-value = infinity in linear regression

I'm having this same issue. I've been using surveylogistic mostly in an analysis of HCUP NIS data, but when I went to analyze the effect of year on a couple of continuous variables with surveyreg, I'm getting infinite t-values, and in one domain, the reference category for year has values when it should have none.

proc surveyreg data=sga.sga4yrs nomcar;

     class yearcat insure;

     model los = yearcat female insure conganom / solution;

     strata new_stratum;

     cluster hospid;

     weight discwt;

     domain insubset*multiple*sgafm;

run;

All the domain variables are dichotomous categorical variables. Weight is supplied by HCUP. LOS is continuous. Yearcat is a categorical (4 categories) variable indicating which year the observation is from (reversed the order so the earlier year would be the reference cat). If I run yearcat as continuous, I still get problems.

Does anything pop out at people? Any more information needed?

Grand Advisor
Posts: 10,043

Re: Why am I getting a t-value = infinity in linear regression

1) it would be better to start a new question

2) in the appropriate part of the forum such as statistical procedures

3) post some of your output such as the data summary, fit statistics and estimated regression coefficients

Trusted Advisor
Posts: 1,426

Re: Why am I getting a t-value = infinity in linear regression

Maybe I'm just fortunate, but I have never seen a t-value of infinity in SAS output. I have seen missing t-values, is that what you have, or is it truly showing as infinity?

Respected Advisor
Posts: 2,655

Re: Why am I getting a t-value = infinity in linear regression

Well, to get a t value of infinity, that would imply that the standard error is zero.  I have seen that in complete collinearity situations.

Steve Denham

Trusted Advisor
Posts: 1,426

Re: Why am I getting a t-value = infinity in linear regression

I guess I meant that if my memory serves, even in that situation you get a t-value of missing.

Or is my memory faulty?

Respected Advisor
Posts: 2,655

Re: Why am I getting a t-value = infinity in linear regression

Hey, I'm the old guy with memory problems.  Anyway, I have seen F and t values reported as "Infnty".  These are almost always associated with df=0 (mixed models).

Steve Denham

Trusted Advisor
Posts: 1,426

Re: Why am I getting a t-value = infinity in linear regression

Yes, I assume that one of us has a faulty memory.

But I agree that 0 degrees of freedom is the only cause I can think of.

Occasional Contributor
Posts: 6

Re: Why am I getting a t-value = infinity in linear regression

Steve, when I run the models, I do get 0 df for whatever the first variable in the class statement is. I'm going to try to attach some results. I would paste them in, but for some reason my browser isn't letting me paste into this text box, and I have no other options at the moment.

If I remove the weight statement, I suddenly get results that at least appear normal (no infinite t-values, no values for my reference category).

Occasional Contributor
Posts: 6

Re: Why am I getting a t-value = infinity in linear regression

Actually, looks like I'll have to wait until I get home and can use a different browser.

Respected Advisor
Posts: 2,655

Re: Why am I getting a t-value = infinity in linear regression

Yeah, a look at the output should clear this up some.  I am thinking that it has to do with the default parameterization with the WEIGHT statement as opposed to without the statement.

Steve Denham

Occasional Contributor
Posts: 6

Re: Why am I getting a t-value = infinity in linear regression

Here's the output with and without weights

Attachment
Respected Advisor
Posts: 2,655

Re: Why am I getting a t-value = infinity in linear regression

Everything looks fine except the second portion (unweighted and t values of Infnty) and the first where all the yearcat coefficients appear (none set to zero).  I notice that the output in the second portion does not include the clusters (assume that it is the second of the possible domains).  Could you possible split those 3M obs into a separate dataset and do some exploring there?  I know you said you have subsetted and reduced the model before, but it looks like that particular domain is giving you an unweighted analysis, and I don't see any reason for it.

As far as the first, since a generalized inverse was used, and the estimates are identical to within roundoff errors, I suspect.  Try printing the X'WX matrix and its inverse (X and I options to the MODEL statement), and maybe something will jump out.

Steve Denham

Occasional Contributor
Posts: 6

Re: Why am I getting a t-value = infinity in linear regression

Thanks for the feedback Steve,

I'll try that out and let you know what I find.

Alex

Ask a Question
Discussion stats
  • 13 replies
  • 1570 views
  • 0 likes
  • 5 in conversation