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 | |||||||
Parameter | Estimate | Standard Error | DF | t Value | Pr > |t| | Lower | Upper |
a | 0.7181 | 0.06263 | 26 | 11.47 | <.0001 | 0.5894 | 0.8468 |
n | -0.2904 | 0.06313 | 26 | -4.6 | <.0001 | -0.4202 | -0.1607 |
c | 0.07872 | 0.03938 | 26 | 2 | 0.0562 | -0.00222 | 0.1597 |
delta_a | 0.5692 | 0.1104 | 26 | 5.16 | <.0001 | 0.3424 | 0.796 |
delta_n | -0.1188 | 0.07111 | 26 | -1.67 | 0.1068 | -0.265 | 0.0274 |
delta_c | 0.08615 | 0.04107 | 26 | 2.1 | 0.0458 | 0.00174 | 0.1706 |
I want to know if "n" is significantly different from 1 instead of 0.
thanks.
ming
I would try
ESTIMATE "n vs 1" n - 1.0;
PG
Thank you so much for your help!!!
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;
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.
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.