58m ago
Season
Barite | Level 11
Member since
12-03-2022
- 299 Posts
- 158 Likes Given
- 8 Solutions
- 41 Likes Received
-
Latest posts by Season
Subject Views Posted 9 19m ago 41 yesterday 56 Monday 114 Monday 75 Monday 211 Monday 384 Sunday 436 Sunday 250 Friday 760 Friday -
Activity Feed for Season
- Posted Re: Goodness of Fit Multinomial SURVEYLOGISTIC on Statistical Procedures. 19m ago
- Posted Re: proc nlmixed for custom log likelihood on Statistical Procedures. yesterday
- Posted Re: Can we do the approximately unbiased estimator for the probability density function of cont. var on Statistical Procedures. Monday
- Liked Re: Can we do the approximately unbiased estimator for the probability density function of cont. var for yabwon. Monday
- Posted Re: Fill missing values with the previous values on SAS Programming. Monday
- Liked Re: Random forest with SAS 9.4? for ballardw. Monday
- Got a Like for Re: Can we do the approximately unbiased estimator for the probability density function of cont. var. Monday
- Liked Re: Fill missing values with the previous values for Demographer. Monday
- Posted Re: Can we do the approximately unbiased estimator for the probability density function of cont. var on Statistical Procedures. Monday
- Liked Re: Can we do the approximately unbiased estimator for the probability density function of cont. var for yabwon. Monday
- Got a Like for Re: Can we do the approximately unbiased estimator for the probability density function of cont. var. Monday
- Posted Re: Can we do the approximately unbiased estimator for the probability density function of cont. var on Statistical Procedures. Monday
- Got a Like for Re: Can we do the approximately unbiased estimator for the probability density function of cont. var. Monday
- Liked Re: Can we do the approximately unbiased estimator for the probability density function of cont. var for FreelanceReinh. Sunday
- Posted Re: Can we do the approximately unbiased estimator for the probability density function of cont. var on Statistical Procedures. Sunday
- Got a Like for Re: Can we do the approximately unbiased estimator for the probability density function of cont. var. Sunday
- Liked Re: Can we do the approximately unbiased estimator for the probability density function of cont. var for TomHsiung. Sunday
- Posted Re: Can we do the approximately unbiased estimator for the probability density function of cont. var on Statistical Procedures. Sunday
- Got a Like for Re: Can we do the approximately unbiased estimator for the probability density function of cont. var. Saturday
- Posted Re: PROC GLM and the 'diff' option in LSMEANS on Statistical Procedures. Friday
-
Posts I Liked
Subject Likes Author Latest Post 1 1 13 1 3 -
My Liked Posts
Subject Likes Posted 1 Monday 1 Monday 1 Sunday 1 Sunday 1 Friday
19m ago
As Heeringa et al. points out on page 269 of their book Amazon.com: Applied Survey Data Analysis (Chapman & Hall/CRC Statistics in the Social and Behavioral Sciences): 9780367736118: Heeringa, Steven G., West, Brady T., Berglund, Patricia A.: Books, complex survey invalidates the key assumptions under the ordinary likelihood ratio (LR) test, namely the kind of LR tests used in models built under simple random sampling.
However, Heeringa et al. also pointed out the presence of complex survey-adjusted versions of the LR test, including Tests for Regression Models Fitted to Survey Data - Lumley - 2014 - Australian & New Zealand Journal of Statistics - Wiley Online Library and AIC and BIC for modeling with complex survey data | Journal of Survey Statistics and Methodology | Oxford Academic. Moreover, as the name of the second paper cited in this paragraph indicates, complex survey-adjusted versions of Akaike information criterion (AIC) and Bayesian information criterion (BIC) have also been developed.
However, none of the aforementioned methods are available in any of SAS's SURVEY procedures like PROC SURVEYLOGISTIC. Instead, SAS uses a Rao-Scott correction for LR tests in complex surveys. Neither Heeringa et al. nor Taylor H. Lewis, author of Complex Survey Data Analysis with SAS | Taylor H. Lewis | Taylor & Fra, gave comments on whether the Rao-Scott correction is a valid method to assess the goodness-of-fit of logistic regression models built with survey data. Instead, both books suggested using the Wald's test as an alternative to the LR test when it comes to simulataneously testing whether a series of regression coefficients all equal to certain pre-specified values. But Wald's test is not a good choice of quantifying and comparing models' goodness-of-fit unless there is a model that fails it (i.e., the null assumption not rejected).
Summarizing my knowledge on this issue, I think a safer way to assess the goodness-of-fit of your model is to use complex survey-adjusted version of the AIC or BIC. Also, you can refer to the LR test proposed by Tests for Regression Models Fitted to Survey Data - Lumley - 2014 - Australian & New Zealand Journal of Statistics - Wiley Online Library. These methods, as Heeringa et al. points out, are available in the R package survey, but not in SAS.
As for the Rao-Scott adjusted version of LR tests provided by PROC SURVEYLOGISTIC, I think you can anyway retain its result as an alternative to the two methods I mentioned in the last paragraph, given that it is documented in SAS Help and is therefore endorsed by SAS's developers.
... View more
yesterday
I am not an expert in compiling codes for maximizing custom likelihoods, but I know somebody is. There is a monograph dedicated to the theory of maximum likelihood estimation as well as how to implement it in statistical softwares including SAS named Maximum Likelihood Estimation and Inference: With Examples in R, SAS and ADMB (Statistics in Practice Book 112) 1, Millar, Russell B. - Amazon.com. Issues on maximizing custom likelihoods via SAS procedures like PROC NLMIXED and PROC NLP are discussed frequently in that book. While waiting for an expert in the community for his/her help, you may also consult the book to see if there is anything useful. In addition, writing an e-mail to the author of the book to directly raise your question to him/her might be of help.
... View more
Monday
Thanks! What a wonderful presentation! I think you can expand the explanations of your code, make it a research paper and submit it to SAS conferences or statistical journals.
... View more
Monday
Thanks for the code! I used to encounter the exact situation you met and found the RETAIN statement hard to use. I usually ended up compiling a code whose flow of execution was not completely understood by me despite it gave the result I wanted. When things did not work, I sometimes had to resort to PROC IML because doing this job is easier there, thanks to a more intuitive collection of available statements in IML.
... View more
Friday
SAS Help is not perfect. For instance, months ago, I wanted to import a multi-sheet Excel spreadsheet into SAS and was stuck on how to import the data on different sheets to different datasets automatically. Lots of efforts were spared, but I finally came to know in SAS Community that there is a SHEET statement in PROC IMPORT that can do the job (Re: Import and merge multiple sheets from excel). However, that statement is not present in the documentation of PROC IMPORT. So SAS Help is a good manual to rely on, but sometimes information from other sources like SAS Community is also indispensable.
... View more
Thursday
First of all, please make sure about the module you wish to invoke for your analysis. @kmwats orignially raised questions on PROC CAUSALMED but digressed to PROC PSMATCH as he/she found it suitable for his/her analysis.
Second, based upon your reply, it seems that you are really looking for information on conducting complex survey data analysis with PROC CAUSALMED. If that is the case, then I regret to inform you that the SAS's built-in SURVEY procedures only serve to conduct a fraction of complex survey data analysis. In other words, many of the complex survey data versions of advanced statistical methods are not supported by SAS's built-in procedures. Mediation analysis in the setting of complex survey data analysis is one of the methods not supported by SAS's built-in proceudres till now.
To get around this with SAS, you must either be quite familiar with the algorithms of the method and compile a macro from scratch or search on the web and use a macro compiled by someone else, if there is any. However, given my experience in complex survey data analysis, it is usually quite futile to search on the web over and over again for a SAS macro, as the number of SAS users skilled at complex survey data analysis and willing to deal with the very problem you encounter is too small for the generation of at least one paper on every particular problem.
Therefore, I suggest that you search on the web briefly to see if anybody has compiled such macros. If the answer is no, then I suggest that you stop searching for SAS macros and switch to looking for R packages. It is much more likely to find R packages for a certain question than to find a SAS macro for the same one.
... View more
a week ago
Yes, models for zero-inflated continuous data are complex indeed. Modeling them requires both sound probability theory and statistical programming knowledge. It is up to you to decide which model to choose. However, I am not very skilled at mixed models. I suggest that you wait @SteveDenham, who has been answering many questions on mixed models in the community and is also in the chat, for answers to the two questions you raised yesterday. Good luck on your project!
... View more
2 weeks ago
Thank you for your additional information! But aren't PROC QLIM and PROC HPQLIM used for modeling limited dependent variables like zero-inflated data? Can they build joint mean and variance models for uncensored data?
... View more
3 weeks ago
@SteveDenham wrote:
You can set the truncation value at a small non-zero value, and all of the estimates are correctly determined. The issue becomes what is the small value to use. I think a good way to choose would be to see to how many decimal places the response is measured, and then set the truncation at half that value. For example, suppose you measure the response to the nearest thousandth (=Y.YYY). Under this scheme, the truncation value of 0.0005 would guarantee that it is greater than zero, and that all observed values are included.
Or am I still missing the point here?
SteveDenham
I think your solution of tentatively selecting several thresholds and see what happens is a very nice idea. Despite the scheme you proposed was built upon selecting truncation thresholds, such attempts can be easily carried over to the selection of censoring thresholds. Therefore, I tried your approach on my data.
Before I disclose my findings, I would like to reiterate first that my original objective was to model the relationship between y and x1, x2, ..., xn. However, the SEVERITY procedure is versatile and can serve to perform multiple tasks. The more basic one is to estimate the parameters of the distribution(s) that y follow. A more advanced one is to build regression models for the scale parameter of the distribution(s) of y, e.g., the parameter μ if y follows a lognormal distribution. The latter can be done by adding the SCALEMODEL statement in the SEVERITY procedure.
In line with the capabilities of this module, my efforts of implementing your idea was also directed in two directions: (1) estimate the parameters of y in the absence of predictors; (2) estimate both the non-scale parameters of y as well as the regression coefficients of the model for the scale parameter. To accomplish the two goals, I tried several minuscule yet positive thresholds. They were of course smaller than the smallest observed positive value of my dataset.
However, it was disturbing to find out that setting different thresholds did lead to different results. For the first objective, PROC SEVERITY still exhibited some consistency, at least in the estimation of several (but not all!) distributions that were built into this module. For the second objective (i.e., in the presence of predictors), the regression coefficient estimates of the scale parameter model deviated from each other more or less, and even quite wildly on some occasions.
Therefore, the conclusion is that PROC SEVERITY is not a good tool for dealing with zero-censored data as the results is dependent on the specification of the censoring threshold. A supplement to this conclusion is that PROC SEVERITY supports multiple advanced functions relating to parameter estimation, including the specification of starting values that play a role in the maximum likelihood estimation process, the underlying method that this procedure uses to accomplish all of the aforementioned tasks. I am not sure whether delicate application of these utilities could remedy the problems I pointed out in the preceding paragraph, but I have not interest in trying it out.
... View more
3 weeks ago
Thank you for your explantaion on the theoretical and practical details! I have learnt a lot!
... View more
3 weeks ago
1 Like
As @StatDave said it is a zero-inflation model generally suited to COUNT data ,not a continous data.
Check this brand-new session:
https://communities.sas.com/t5/SAS-Communities-Library/Making-Zero-Inflation-Count/ta-p/962019/jump-to/first-unread-message
... View more
3 weeks ago
I continued reading the documentation of PROC SEVERITY yesterday and found one of the examples in it (SAS Help Center: Example 29.3 Defining a Model for Mixed-Tail Distributions) explictly pointed out the second phenomenon you mentioned, namely the presence of extreme values. However, it was also explicly stated there that these values should not be regarded as outliers and hence discarded. So I am afraid that @Ronein should embark on a more complicated analysis instead of simply deleting the extreme values. The good news for @Ronein is a code suitable for this purpose is readily available, saving a lot of work.
By the way, the documentation also contains an example of building finite mixture models with PROC SEVERITY, so relevant codes are also readily available there.
... View more
3 weeks ago
Hello, there. I found your post while searching for something on the lognormal distribution in the community. I read from your profile that you have not been here for more than four years. In addition, this question was raised more than 10 years ago. I am not sure if your problem has been solved and if you need my answer for the time being. But I think somebody else may need it and am therefore here to offer my viewpoint on your problem.
I think ANOVA is a suitable choice in terms of estimating the group means. But forming confidence intervals is not so intuitive under your setting. Why not try the accelerated failure time (AFT) model and put the group indicators as the only independent variables in your model? The AFT model is very inclusive in the sense that the lognormal distribution is only one of the popular distributions that can be modeled. Methods of inferences with respect to the AFT model, including the construction of confidence intervals of the dependent variable, may be more comprehensively studied than the log-transformed version of ANOVA you employed. I think you can have a try.
I have also found an article that might solve your problem under another paradigm. You may take a look. Inferences on the means of lognormal distributions using generalized p-values and generalized confidence intervals - ScienceDirect
... View more
4 weeks ago
It sounds like there's no way to adjust the style of the output table directly within the proc surveyfreq statement. So I'll try as you suggested and save the proc surveyfreq output, and then use a different procedure statement to make a more reader-friendly table. Thank you for the help.
... View more