turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Standard Error not calculated in proc hpgenselect ...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

2 weeks ago

I am running logit regressions using proc hpgenselect. The model is specified with class statement and there can be more than 100 levels in the class variable. The problem I am facing is some of coefficient estimates have zero DF with missing Standard Error. My understanding is that SE can be missing when the Hessian could not be calculated, and I thought choosing second order optimization method could resolve the issue. I have less variables with missing SE after using second order optimization, but still have some parameters missing SE. Can anyone explain why? I am looking for both 'why' and 'how to resolve'. I have no liberty to make changes on model specification. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

2 weeks ago

Are you sure that this isn't just the standard behavior when you use the GLM parameterization for a classification variable?

Try switching to a reference parameterization and see if it solves the issue. Compare the following:

```
proc hpgenselect data=sashelp.class;
class age; /* use GLM parameterization, which is singular */
model weight = age;
run;
proc hpgenselect data=sashelp.class;
class age / ref=LAST; /* use nonsingular parameterization */
model weight = age;
run;
```

For documentation of the various parameterizations, see

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

2 weeks ago

Thank you, Rick. I see less number of parameters are missing SE when the reference parameterization is used. But I still have missing SE for some variables. I think parameterization is part of the reason but probably not the only reason. Because if I run the same model with GLM parameterization on different input datasets, I do not have missing SE at all.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

2 weeks ago

ncmc wrote:

if I run the same model with GLM parameterization on different input datasets, I do not have missing SE at all.

Which strongly indicates there is something in your data, perhaps no variability for some variables or combinations there of.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

2 weeks ago

If your class variable with more than 100 levels is not the parameter of interest, then I will suggest to use a conditional regression. That means you still have the variable in the model, but in a non-parametric way. You will therefore not get estimates for that variable. This will reduce the number of parameters alot, and therefore also likely solve the problem. There are different ways to do that. In logistic regression you can simply use the strata statement in PROC LOGISTIC. If your data is continous you can put the class variable into the "absorb" statement instead of class statement in PROC GLM.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

2 weeks ago

Please show us the syntax that you are using to call PROC HPGENSELECT.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

2 weeks ago

Hi Rick @Rick_SAS, the syntax is as below.

proc hpgenselect data=subset;

where HoldOut=0;

class GeogKey ;

id prodkey geogkey week;

ods output parameterestimates = est0 ConvergenceStatus=ConvgStatus ;

model &dep (event='1') = GeogKey &explanatoryvars /dist=Binary link=logit NoInt ;

weight OBSWGT;

output out=PredData predicted=Pred_&dep ;

run;

@JacobSimonsen Nonparameterizing class variables cannot be an option for this project. I agree with you @ballardw that this is very likely to be data issue, but all the invariant variables are dropped before this procedure. My question at this point is how optimization could converge eventhough it could not calculate Hessian (my understanding is that the default optimization technique is second derivative method).

Many thanks for all of your help.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

2 weeks ago

My guess is that missing values are the issue.

Let's say that one level of GEOGKEY (call it GEOKEY='K') has only a few observations and that one or more of the covariates have missing values for those observations. The procedure will drop the observations that have missing values, which will perhaps leave only ONE observation for the set GEOGKEY='K'. That will lead to the DF=0 issue that you report. (This could also occur if your weight variable has missing or nonpositive values.)

To determine whether this is the issue, you could do the following:

1. Output the design matrix, probably by using PROC LOGISTIC

2. Use the DATA step to delete all rows that have any missing values for the explanatory variables or invalid weight variables.

3. Use PROC FREQ ORDER=FREQ; TABLE GEOGKEY; RUN; to count the number of valid observations in each level of GEOGKEY.

If there are one or more levels that have insufficiently many observations, you can use a WHERE clause to exclude them from the analysis.