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


proc nlmixed data=lab3; /*the dataset include two variable: ID, age for death*/ parms mu 1 sigma 1 ; bounds 0 < sigma; G_t=exp ((age- mu)/sigma); g=exp((age-mu)/sigma)/sigma; ll= exp(- G_t)* g; model age~ general(ll); run;

I wrote the code based on the below conditions:

 

We consider the location-scale-skew transform
G(y)=exp[( y−μ)/σ] with derivative g(y)=exp[( y−μ)/σ]/σ.

We assume that G(Y)∼fE(y)=exp(−y). Then Y follows a generalized extreme value distribution fSE(y)=fE[G(y)]g(y)=exp[−G(y)]g(y)

 

 

 

however, the code does not work well.

NOTE: Convergence criterion (FCONV=2.220446E-13) satisfied.
NOTE: At least one element of the gradient is greater than 1e-3.
NOTE: Moore-Penrose inverse is used in covariance matrix.
WARNING: The final Hessian matrix is full rank but has at least one negative eigenvalue. Second-order
         optimality condition violated.
NOTE: PROCEDURE NLMIXED used (Total process time):
      real time           1.98 seconds
      cpu time            1.61 seconds

 

does anyone know how to do this in SAS?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jie111
Quartz | Level 8
proc nlmixed data=lab3;
parms mu 80 sigma 5 ;
bounds 0 < sigma;
ll= -exp((age - mu)/sigma) + (age - mu)/sigma - log (sigma);
model age~general(ll);
run;

Jie111_0-1590666017940.png

 

 

updating.

 

The above syntax works well this time. it seems that I need to define the initial value for mu and sigma near the value of parameters. Is there any way to deal with the initial value or do I have to give the initial value artificially?

View solution in original post

1 REPLY 1
Jie111
Quartz | Level 8
proc nlmixed data=lab3;
parms mu 80 sigma 5 ;
bounds 0 < sigma;
ll= -exp((age - mu)/sigma) + (age - mu)/sigma - log (sigma);
model age~general(ll);
run;

Jie111_0-1590666017940.png

 

 

updating.

 

The above syntax works well this time. it seems that I need to define the initial value for mu and sigma near the value of parameters. Is there any way to deal with the initial value or do I have to give the initial value artificially?

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 994 views
  • 0 likes
  • 1 in conversation