% usefile c:\oupbuch\habitatselection\habitatselection_ch3.prg dataset d d.infile using c:\oupbuch\habitatselection\brownbears.dat remlreg r % Fixed effects model logopen using c:\oupbuch\habitatselection\ch3\brownbears_fixed.log r.outfile = c:\oupbuch\habitatselection\ch3\brownbears_fixed r.regress hab = loga_catspecific(offset) + age1 + age2 + disperser + elevation_catspecific + slope_catspecific + sinasp_catspecific + cosasp_catspecific, family=multinomialcatsp naindicator=na_catspecific reference=1 using d logclose % random effects model logopen using c:\oupbuch\habitatselection\ch3\brownbears_random.log r.outfile = c:\oupbuch\habitatselection\ch3\brownbears_random r.regress hab = loga_catspecific(offset) + age1 + age2 + disperser + elevation_catspecific + slope_catspecific + sinasp_catspecific + cosasp_catspecific + id(random), family=multinomialcatsp naindicator=na_catspecific reference=1 using d logclose drop d r