Programming the statistical procedures from SAS

how do you test parameter estimates against 1 in proc nlmixed?

Accepted Solution Solved
Reply
Contributor
Posts: 30
Accepted Solution

how do you test parameter estimates against 1 in proc nlmixed?

Hi,

The proc nlmixed result generated few parameter estimates that are significant (p<0.0001), these are to show the estimates are significantly difference from zero.  How can test if these parameters are significantly different from 1?

sample results:

Parameter Estimates
ParameterEstimateStandard ErrorDFt ValuePr > |t|LowerUpper
a0.71810.062632611.47<.00010.58940.8468
n-0.29040.0631326-4.6<.0001-0.4202-0.1607
c0.078720.039382620.0562-0.002220.1597
delta_a0.56920.1104265.16<.00010.34240.796
delta_n-0.11880.0711126-1.670.1068-0.2650.0274
delta_c0.086150.04107262.10.04580.001740.1706

I want to know if "n" is significantly different from 1 instead of 0.

thanks.

ming


Accepted Solutions
Solution
‎09-15-2014 12:22 PM
Respected Advisor
Posts: 4,606

Re: how do you test parameter estimates against 1 in proc nlmixed?

I would try

ESTIMATE "n vs 1" n - 1.0;

PG

PG

View solution in original post


All Replies
Solution
‎09-15-2014 12:22 PM
Respected Advisor
Posts: 4,606

Re: how do you test parameter estimates against 1 in proc nlmixed?

I would try

ESTIMATE "n vs 1" n - 1.0;

PG

PG
Contributor
Posts: 30

Re: how do you test parameter estimates against 1 in proc nlmixed?

Thank you so much for your help!!!

Super Contributor
Posts: 271

Re: how do you test parameter estimates against 1 in proc nlmixed?

An other way to do this is calculating a likelihood ratio test. You get the -2 log(L) value in the output. Then you just need to run the model Again with n replaced by "1". Below I tried do so on an example from the documentation where I test β2=1.


data pump;
   input y t group;
   pump = _n_;
   logtstd = log(t) - 2.4564900;
   datalines;
5  94.320 1
1  15.720 2
5  62.880 1
14 125.760 1
3   5.240 2
19  31.440 1
1   1.048 2
1   1.048 2
4   2.096 2
22  10.480 2
;

ods output fitstatistics=m0;
proc nlmixed data=pump;
   parms logsig 0 beta1 1 beta2 1 alpha1 1 alpha2 1;
   if (group = 1) then eta = alpha1 + beta1*logtstd + e;
   else eta = alpha2 + beta2*logtstd + e;
   lambda = exp(eta);
   model y ~ poisson(lambda);
   random e ~ normal(0,exp(2*logsig)) subject=pump;
run;


ods output fitstatistics=m1;
proc nlmixed data=pump;
   parms logsig 0 beta1 1 alpha1 1 alpha2 1;
   if (group = 1) then eta = alpha1 + beta1*logtstd + e;
   else eta = alpha2 + 1*logtstd + e;
   lambda = exp(eta);
   model y ~ poisson(lambda);
   random e ~ normal(0,exp(2*logsig)) subject=pump;
run;

data _NULL_; 
  merge m0(rename=(value=m0)) m1(rename=(value=m1));
  where (descr='-2 Log Likelihood');
  chisquare=(m1-m0);
  pvalue=sdf('chisquare',chisquare,1);
  put pvalue pvalue6.4;
run;

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 236 views
  • 3 likes
  • 3 in conversation