Skip to content

What is the SAS equivalent of this R glm() code?

5 messages · Bert Gunter, Peter Dalgaard, Paul Miller

#
ummm...

This is an R list. Shouldn't you be posting this query on a SAS list?

-- Bert

(and why would you want to do this anyway?! ... but we won't go there.)
On Fri, Dec 3, 2010 at 1:42 PM, Paul Miller <pjmiller_57 at yahoo.com> wrote:

  
    
#
On Dec 3, 2010, at 22:42 , Paul Miller wrote:

            
Well, you're not saying what "." contains, so no-one can foresee all implications, but the closest parallels are usually found with PROC GENMOD. Something like

  proc genmod data=ingot2;
  model r/n=t / dist=binomial link=probit;
  run;

(shamelessly lifted from a Google search)

Notes: 

- I don't think you can avoid spelling out the list of variables in "."

- "-1" (no intercept) is obtained by adding "noint" after the "/" in the model statement

- for binary regression, I believe you may have to explicitly generate a variable n=1

- beware differences in contrast parametrizations for categorical variables