BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ming
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

I would try

ESTIMATE "n vs 1" n - 1.0;

PG

PG

View solution in original post

3 REPLIES 3
PGStats
Opal | Level 21

I would try

ESTIMATE "n vs 1" n - 1.0;

PG

PG
Ming
Calcite | Level 5

Thank you so much for your help!!!

JacobSimonsen
Barite | Level 11

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;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

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