02-24-2022
Yeganeh
Obsidian | Level 7
Member since
11-19-2021
- 12 Posts
- 6 Likes Given
- 0 Solutions
- 0 Likes Received
-
Latest posts by Yeganeh
Subject Views Posted 1592 01-10-2022 03:52 PM 1680 01-09-2022 10:26 PM 1706 01-09-2022 03:56 PM 1744 01-09-2022 01:26 PM 1911 11-25-2021 12:26 PM 1925 11-25-2021 11:16 AM 1971 11-25-2021 05:37 AM 2034 11-24-2021 05:23 PM 2098 11-23-2021 11:17 AM 2139 11-23-2021 01:16 AM -
Activity Feed for Yeganeh
- Posted Re: Random effect estimates (Proc nlmixed) on Statistical Procedures. 01-10-2022 03:52 PM
- Posted Re: Random effect estimates (Proc nlmixed) on Statistical Procedures. 01-09-2022 10:26 PM
- Posted Re: Random effect estimates (Proc nlmixed) on Statistical Procedures. 01-09-2022 03:56 PM
- Posted Random effect estimates (Proc nlmixed) on Statistical Procedures. 01-09-2022 01:26 PM
- Posted Re: QQ plots for random effects on Statistical Procedures. 11-25-2021 12:26 PM
- Posted Re: QQ plots for random effects on Statistical Procedures. 11-25-2021 11:16 AM
- Liked Re: QQ plots for random effects for sbxkoenk. 11-25-2021 11:15 AM
- Posted Re: QQ plots for random effects on Statistical Procedures. 11-25-2021 05:37 AM
- Posted QQ plots for random effects on Statistical Procedures. 11-24-2021 05:23 PM
- Posted Re: WARNING: The final Hessian matrix is full rank but has at least one negative eigenvalue. on Statistical Procedures. 11-23-2021 11:17 AM
- Liked Re: WARNING: The final Hessian matrix is full rank but has at least one negative eigenvalue. for StatDave. 11-23-2021 11:09 AM
- Posted Re: WARNING: The final Hessian matrix is full rank but has at least one negative eigenvalue. on Statistical Procedures. 11-23-2021 01:16 AM
- Liked Re: WARNING: The final Hessian matrix is full rank but has at least one negative eigenvalue. for StatDave. 11-23-2021 12:05 AM
- Posted Re: WARNING: The final Hessian matrix is full rank but has at least one negative eigenvalue. on Statistical Procedures. 11-22-2021 11:35 PM
- Liked Re: WARNING: The final Hessian matrix is full rank but has at least one negative eigenvalue. for sbxkoenk. 11-22-2021 05:02 PM
- Liked Re: intial values for parms in proc nlmixed for Rick_SAS. 11-22-2021 01:19 PM
- Liked Re: WARNING: The final Hessian matrix is full rank but has at least one negative eigenvalue for SteveDenham. 11-22-2021 01:18 PM
- Posted WARNING: The final Hessian matrix is full rank but has at least one negative eigenvalue. on Statistical Procedures. 11-21-2021 09:46 PM
-
Posts I Liked
Subject Likes Author Latest Post 1 3 2 1 3
01-10-2022
03:52 PM
Thanks Jill for the detailed reply. Thank you for the all answers.
... View more
01-09-2022
10:26 PM
Proc nlmixed maxiter=10000;
Parms b0=1 , b1=0 , b2=0 , b3=0 , a0= 1, g0=1 , V_u1=1;
Aialpha=a0;
Gigamma=g0;
Bibeta= b0 + b1*x1 + b2 *x2 + b3*time;
Lambda=exp(b0 + b1*x1 + b2* x2 + b3*time + u1);
P1= exp(Aialpha) / (1+ exp(Aialpha) + exp (Gigamma));
P2= exp(Gigamma) / (1+ exp(Gigamma) + exp (Aialpha));
P3=1-p1-p2;
If y=0 then ll = log (p1 + p3*exp(-lambda));
If y=1 then ll= log (p2 + p3*(1)*exp(-lambda)* lambda);
If y>1 then ll= log(p3) – lambda + y*log(lambda) – lgamma (y+1);
Model y ~ general (ll);
Random u1 ~ normal (0, [v_u1]) subject=id;
Run;
I need to estimate u1 for each individual. then to assess goodness of fit, I want to draw qq plot of the random effects in the Poisson and inflated parts of the model by gender group. In a well-fitted model, the distribution of estimated random effects (in each model part) should lie along the line y=x. I couldn't find a code for this problem, Could you help me construct a code for it, please?
Thank you
... View more
01-09-2022
03:56 PM
I have repeated measurements of count data and want to show violation of homogeneous random effects in sex or other known collected factors in the data. I have no code for it
... View more
01-09-2022
01:26 PM
Dear all I am trying to run a proc nlmixed program. I have to estimate random effects to assess goodness of fit. 1. How can I estimate random effects for each individual in proc nlmixed? 2. Is it possible to use empirical bayes approach for this purpose in sas?
... View more
11-25-2021
12:26 PM
ui: The random effect related with zero part vi: The random effect related with poisson part
... View more
11-25-2021
11:16 AM
Hi Koen, I want to make qq plot for random effects in the different groups separately. I have attached the figure. It seems we need the (ui,vi) before making this plot. I tried to use /solution to estimating random effects but, it could not estimate random effects. I used proc univariate; var dmft; class sex; qqplot /normal(mu=est sigma=est) square; run; This code has limitations. It can't provide qq plot for two parts of zip model. For a detailed description of this figure, please refer to my former post (WARNING: The final Hessian matrix is full rank but has at least one negative eigenvalue)
... View more
11-24-2021
05:23 PM
Hello everyone, I have to assume the data is heterogeneous. So I want to draw qq plot for each part of the zero-inflated model: random effects in zero-part within men/women random effects in Poisson-part within men/ women If possible, Could you provide code for it, please? I look forward to your reply. Best, Yeganeh
... View more
11-23-2021
11:17 AM
Ok, I get it now. That's clear. Thank you for your immediate reply.
... View more
11-23-2021
01:16 AM
Hi, I'm so grateful for your suggestions. I check it.
... View more
11-22-2021
11:35 PM
Dear Koen, Thank you for sharing your valuable advice with me. When I used proc genmod, parameters of zero model had a high SE. proc genmod data = migraine; model attack= Time Group*Time/ dist=zip; zeromodel Time Group*Time/link = logit; run; Also, I ran proc glimmix and proc countreg but, the initial values didn't work correctly.(unable to estimate SE or high SEs) proc glimmix data = migraine noclprint method=laplace; class id; model attack= Time Group*Time / solution dist=poisson; random intercept / subject = id; run; proc countreg data=migraine; model attack= Time Time *Group / dist=zip; zeromodel attack~Time Time *Group/ link=logistic; run; I appreciate your guidance.
... View more
11-21-2021
09:46 PM
Hi everybody, I am trying to run zip model in proc nlmixed (SAS 9.4): proc nlmixed data=migraine maxiter=10000; parms b0 =1 b1 = 0 b2= 0 c0 =1 c1 = 0 c2= 0 z0= 0 z1= 0 z2= 0 z3= 0 rho=-0.2 s2u =1 s2v=1; /*linear predictor for mixture probability of zero part*/ linp_pi = b0 + b1*time+ b2*group*time+ u; pi = exp(linp_pi)/(1+exp(linp_pi)); /*linear predictor for mean of counts (poisson part)*/ linp_mu = c0 + c1*time+ c2*group*time+ v; mu = exp(linp_mu); logsigu2 = z0 + z1*group; logsigv2 = z2 + z3*group; s2u=exp(logsigu2); suv=rho*sqrt(exp(logsigu2)*exp(logsigv2)); s2v=exp(logsigv2); if attack=0 then ll = log((pi) + (1-pi)*exp(-mu)); else ll = log((1-pi)) + attack*log(mu) - lgamma(attack+1)- mu; model attack ~ general(ll); random u v ~ normal([0,0],[s2u,suv,s2v]) subject=id; run; I am attaching longitudinal data. While running my model for "cov hess, tech=newrap, method= gauss, maxiter, qmax noad, seed=12345", Unfortunately, I always face this warning and have some large SE or no SE . WARNING1: The final Hessian matrix is full rank but has at least one negative eigenvalue. Second-order optimality condition violated. WARNING2: The final Hessian matrix is not positive definite, and therefore the estimated covariance matrix is not full rank and may be unreliable. The variance of some parameter estimates is zero or some parameters are linearly related to other parameters. I changed initial values, method, qmax...again and again. Sometimes I have Error: Optimization cannot be completed. I don't know what to do. I have a principal question: How do I find appropriate initial values? Thank you for your time. Parameter Estimates Parameter Estimate Standard Error DF t Value Pr > |t| 95% Confidence Limits Gradient b0 -2.6089 0.4103 64 -6.36 <.0001 -3.4285 -1.7893 6.81751 b1 -1.5772 14.2856 64 -0.11 0.9124 -30.1160 26.9617 0.071280 b2 -2.5369 12.5514 64 -0.20 0.8405 -27.6111 22.5373 0.078330 c0 0.7799 0.1335 64 5.84 <.0001 0.5133 1.0466 -25.8045 c1 -0.4147 0.09284 64 -4.47 <.0001 -0.6002 -0.2292 19.9297 c2 0.09872 0.05501 64 1.79 0.0775 -0.01118 0.2086 -37.4677 z0 0.2445 2.2688 64 0.11 0.9145 -4.2881 4.7770 4.09923 z1 0.4000 1.5060 64 0.27 0.7914 -2.6087 3.4087 6.45820 z2 -0.9555 1.6735 64 -0.57 0.5700 -4.2988 2.3877 -1.27785 z3 -1.3047 1.0613 64 -1.23 0.2234 -3.4249 0.8155 -3.62090 rho 0.07197 2.0419 64 0.04 0.9720 -4.0072 4.1512 0.76599 s2u 2.8419 . 64 . . . . 1.73494 s2v 0.02830 0.06871 64 0.41 0.6818 -0.1090 0.1656 -73.7197
... View more