tag:blogger.com,1999:blog-1275149608391671670.comments2019-04-23T19:55:25.842-04:00SAS and RKen Kleinmanhttp://www.blogger.com/profile/09525118721291529157noreply@blogger.comBlogger636125tag:blogger.com,1999:blog-1275149608391671670.post-51532228599767730722019-04-13T12:27:59.770-04:002019-04-13T12:27:59.770-04:00This is very helpful and informative. I do I intro...This is very helpful and informative. I do I introduce error terms to the ytest?Emmanuelhttps://www.blogger.com/profile/15380787574172947898noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-68978108722904707112019-03-17T10:46:53.541-04:002019-03-17T10:46:53.541-04:00How can I download the data sets to simulate the f...How can I download the data sets to simulate the findings!!!!Kamal Chaulagainhttps://www.blogger.com/profile/02264843635580130241noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-66531817742421325712019-02-18T06:25:00.315-05:002019-02-18T06:25:00.315-05:00The negative signs are there because the correct f...The negative signs are there because the correct function is exp^{-XBeta). So you should carry the negative sign throughout your linear terms (beta2*x2, etc.)Nick Hortonhttps://www.blogger.com/profile/00242216324355342047noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-86141678546489703112019-02-17T22:29:46.181-05:002019-02-17T22:29:46.181-05:00Why are there negative signs before the beta for l...Why are there negative signs before the beta for linpred? I have 4 independent variables and betas, will the equation be <br />linpred = exp (-beta1*x1+beta2*x2+beta3*x3+beta4*x4+beta5*x5);<br />where beta1 is the intercept. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-16981929434620001552019-02-12T06:51:32.243-05:002019-02-12T06:51:32.243-05:00Thanks for sharing such a nice article about Plot...Thanks for sharing such a nice article about <a href="http://getaplot.in/farm-plots-on-highway.php" rel="nofollow"> Plots </a>.Unknownhttps://www.blogger.com/profile/12264653736120597141noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-42095174855746649002019-01-18T06:11:14.702-05:002019-01-18T06:11:14.702-05:00Very useful information about SAS (Statistical Ana...Very useful information about <a href="https://mindmajix.com/sas-administration-training" rel="nofollow">SAS (Statistical Analysis System)</a>Nikhil Johnhttps://www.blogger.com/profile/06393952450199115280noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-23088137178944857302018-12-17T11:29:47.528-05:002018-12-17T11:29:47.528-05:00This is a wonderful piece of code. All the layout ...This is a wonderful piece of code. All the layout work has been <br />done upfront and the user doesn't't have to worry about it.<br />It is clean and easily modifiable. And, as a bonus, it doesn't use ggplot :-) <br />Thank you for sharing it. Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-90795179645489701462018-12-08T05:22:35.149-05:002018-12-08T05:22:35.149-05:00It's a really nice experience to read your art...It's a really nice experience to read your article. which is containing full information about SAS(Statistical Analysis System) especially by Predictive modeling approach. To learn <a href="https://mindmajix.com/sas-predictive-modeling-training" rel="nofollow">the Statistical Analysis System</a>Nikhil Johnhttps://www.blogger.com/profile/06393952450199115280noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-37207073466770278982018-12-04T07:30:24.890-05:002018-12-04T07:30:24.890-05:00Great Informative post. You have given a very good...Great Informative post. You have given a very good information about <a href="https://tekslate.com/macro-functions-string-functions-sas/" rel="nofollow">SAS</a> and R. I really appreciate your work. <br /><br />Thanks<br /><a href="https://tekslate.com" rel="nofollow">Siva Prasad</a>Blue Prism Traininghttps://tekslate.com/blue-prism-trainingnoreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-86875895026076642522018-07-31T13:57:43.399-04:002018-07-31T13:57:43.399-04:00Interesting idea, Anonymous. If I read your code ...Interesting idea, Anonymous. If I read your code correctly, you are forcing the y-axis to stop at 3 times the SD, plus or minus. <br /><br />There is a risk here that you will cut off any larger outliers-- they would not show on your plot, which I don't think was your intent.<br /><br />Instead, I think you had intended to avoid the appearance of the example plot, where roughly agreeing data might appear to be in disagreement.<br /><br />You might fix both problems with some comparison between the max deviation and the 3*sd, I think. But for myself, I'm happy with the standard limits.Ken Kleinmanhttps://www.blogger.com/profile/09525118721291529157noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-23636222766456902232018-06-29T11:40:58.411-04:002018-06-29T11:40:58.411-04:00Many Thanks Ken for the code.
Wouldn't it be...Many Thanks Ken for the code. <br /><br />Wouldn't it be more appropriate thought to expand the limit of the y-axis as follow: <br /><br />baplot = function(x,y){<br /> xstd = (x - mean(x))/sd(x)<br /> ystd = (y - mean(y))/sd(y)<br /> <br /> bamean = (xstd+ystd)/2<br /> badiff = (ystd-xstd)<br /> ylim_val = mean(badiff)+3*sd(badiff)<br /> <br /> plot(badiff~bamean, pch=20, xlab="mean", ylab="difference", ylim = c(-ylim_val,ylim_val))<br /># in the following, the deparse(substitute(varname)) is what retrieves the<br /># name of the argument as data<br /> title(main=paste("Bland-Altman plot of x and y\n",<br /> deparse(substitute(x)), "and", deparse(substitute(y)),<br /> "standardized"), adj=".5")<br /> <br />#construct the reference lines on the fly: no need to save the values in new <br /># variable names<br /> abline(h = c(mean(badiff), mean(badiff)+1.96 * sd(badiff),<br /> mean(badiff)-1.96 * sd(badiff)), lty=2)<br />} <br /><br />baplot(x,y)<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-19045165069822520142018-06-15T08:07:50.958-04:002018-06-15T08:07:50.958-04:00This is exactly what I was looking for - a simple ...This is exactly what I was looking for - a simple and straightforward solution, not using some "black box" package, just plain weibull. Thank you for this post! Michal Figurskihttps://www.blogger.com/profile/08615239186541445483noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-3657212153716219492018-06-09T21:44:32.702-04:002018-06-09T21:44:32.702-04:00This is very helpful. Thank you for the post!
Is i...This is very helpful. Thank you for the post!<br />Is it possible to modify your program to simulate a case-control data with P(Y=1)=0.5? Many thanks!!Li Qihttps://www.blogger.com/profile/05770171361554715745noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-40441071904653119352018-06-06T02:10:29.656-04:002018-06-06T02:10:29.656-04:00hello,
i'm trying to find an application in R...hello,<br /><br />i'm trying to find an application in R that allows for latent class analysis for discrete choice experiments. Basically i am sure i will need to impose restrictions on the parameters between classes .. so im not sure what package might allow me to do this - <br />people usually use Nlogit for this *example INVESTIGATING ATTRIBUTE NON-ATTENDANCE AND ITS<br />CONSEQUENCES IN CHOICE EXPERIMENTS WITH LATENT CLASS MODELS*MT S.Ahttps://www.blogger.com/profile/16280473904602685436noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-57207477360313073752018-03-29T11:56:06.795-04:002018-03-29T11:56:06.795-04:00Hi!
Thank you very much for your program.
Is it p...Hi!<br />Thank you very much for your program.<br /><br />Is it possible to use it when model consists of several binary variables Yes/No without contentious variable?<br />I tried to modify the code without success.<br />Sergej Filippovhttps://www.blogger.com/profile/08491414780324887774noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-3245465380131329692018-02-16T14:18:42.855-05:002018-02-16T14:18:42.855-05:00This is very helpful. I was wondering if it is pos...This is very helpful. I was wondering if it is possible for SAS to make the reference group the average score of the outcome, instead of the order of the variable?<br />Nikkihttps://www.blogger.com/profile/14670891862528575390noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-57580687902677338532018-01-24T17:51:43.358-05:002018-01-24T17:51:43.358-05:00Is it possible to use both propensity score inform...Is it possible to use both propensity score information and post-treatment predictors in an outcome model? I haven't seen an example of how to do this in SAS or R.<br /><br /><br />In my data I have, among other variables:<br /><br />migrated (binary outcome- yes or no)<br />military service (binary treatment- yes or no)<br />age (predictive of outcome and treatment- continuous)<br />nativity (predictive of outcome and treatment- categorical)<br />postwar_occupation (occurs after treatment- categorical)<br /><br /><br />Can anyone provide some guidance on how to build the required models to best account for selection into the treatment group and for the effect of postwar occupation?<br /><br /><br />Thank you.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-24571135764325286882017-11-30T06:05:08.042-05:002017-11-30T06:05:08.042-05:00You can use whatever probabilities you like: the s...You can use whatever probabilities you like: the simulation can be structured to track the scenario of interest.Nick Hortonhttps://www.blogger.com/profile/00242216324355342047noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-78555907759646624732017-11-30T04:23:20.579-05:002017-11-30T04:23:20.579-05:00Thanks, that was what I meant. What I am intereste...Thanks, that was what I meant. What I am interested in is the probabilities of treatment assignment. Is it that I would have one set of probabilities representative of all the datasets or each dataset would have it's own set computed separately? Safiya Shttps://www.blogger.com/profile/17928319076513960795noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-6314509654900545182017-11-27T07:45:40.552-05:002017-11-27T07:45:40.552-05:00Safiya, you could certainly use your dataset as th...Safiya, you could certainly use your dataset as the basis of your simulations and create new Y's using the approach we've described. Is that what you mean by "simulate several logistic regression results"?Nick Hortonhttps://www.blogger.com/profile/00242216324355342047noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-34301181556078238702017-11-27T05:08:11.853-05:002017-11-27T05:08:11.853-05:00Supposing I already have a dataset, can I use same...Supposing I already have a dataset, can I use same to simulate several logistic regression results?Safiya Shttps://www.blogger.com/profile/17928319076513960795noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-31878596121259393822017-11-14T04:05:39.360-05:002017-11-14T04:05:39.360-05:00download links are broken but you can get the file...download links are broken but you can get the files there:<br />https://www.jstatsoft.org/article/view/v046c02Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-76787583398348885982017-11-12T00:29:15.023-05:002017-11-12T00:29:15.023-05:00Is there an easy way to switch between inline and ...Is there an easy way to switch between inline and displayed mathematics?Jasonhttps://www.blogger.com/profile/09366339492888340194noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-3200695085341721052017-09-22T16:55:40.085-04:002017-09-22T16:55:40.085-04:00lm() is largely out of our control, and I don'...lm() is largely out of our control, and I don't think it is a good idea to write a replacement for lm().<br /><br />For numerical summaries, take a look at df_stats(). I think you will find it does what you want and interoperates well with ggformula. In particular, it always returns a tidy data frame (hence the d in df_stats). Here is an example:<br /><br /><br />require(mosaic)<br />HELPrct %>% filter(sex == "male") %>% df_stats(age ~ substance, mean, median)<br />## substance mean_age median_age<br />## 1 alcohol 37.95035 38.0<br />## 2 cocaine 34.36036 33.0<br />## 3 heroin 33.05319 32.5Randall Pruimhttps://www.blogger.com/profile/07500805842903136651noreply@blogger.comtag:blogger.com,1999:blog-1275149608391671670.post-23874489521891099772017-09-22T16:10:45.837-04:002017-09-22T16:10:45.837-04:00This is awesome! I just wish I knew about this a ...This is awesome! I just wish I knew about this a week ago (just spent a week teaching my intro stats class a messy conglomerate of tidyverse and mosaic for plotting).<br /><br />I love that the gf_ functions work with the %>% operator! Unfortunately, other formula using methods from base (like lm) or mosaic (like tally or favstats) do not work with the operator, and need data = ., which can potentially be rather confusing.Janhttps://www.blogger.com/profile/06073872742931383080noreply@blogger.com