Missing data is inevitable for several reasons during the clinical trials. As we know, missing data can be classified into one of three categories, like MCAR(Missing Completely At Random), MAR(Missing At Random) and MNAR(Missing Not At Random).
How to implement two color scales in ggplot2
As indicated in the title, this article will discuss how to solve this problem in ggplot2
.
Call ChatGPT API or chatgpt package in R
OpenAI于3月1日发布了ChatGPT API,但其只提供了Python中如何调用此API的文档说明。尽管没提到如何使用R来调用,但是毫无疑问R肯定是可以的,所以我用google搜了下。以下是基于网上资料而整理的简短介绍,如何在R中用ChatGPT。
Four ways to split the column in mutate
Here is just a trick note to demonstrate how to split the column when you use the mutate
function from the dplyr
package in R.
Calculation of follow-up time
Survival analysis is often used in tumor clinical trials, and there are usually two estimations that appear in the report: the median survival time and the median follow-up time.
Partial Date Imputation
Partial dates are very common in clinical trials, such as AE that allow some parts of the date or time to be missing. However, when you create the ADaM dataset for AE, some variables like ASTDT (Analysis Start Date) or AENDT (Analysis End Date) are numeric, so they can be derived only when the date is complete and then you can calculate the durations.
R - Add a blank row after each group
I'm a R-lover and believe that anything SAS can do, R can do better. As R is such a powerful language for statistical analysis in clinical trials. Once, I posted an article that said how to insert blank rows, so I looked up how to do that in R.
R - Replace NA with Zero and Empty String in Multiple Columns
This casual note is to record how to use R to replace the NA with 0 or any string. Generally, NA can be generated for different reasons, like unclean data, data transformation, or missing values. Otherwise, we have to convert NA to zero or other stings in order to present them in tables or listings.
Boxplot With Jittered Points in R
The box plot is used to demonstrate the data distribution in common and to look for outliers. We can also see where the 25% and 75% quarters are, as well as the median value from the box. As a result, it's a very helpful visual chart.
How to save graphs in SAS
Recently, I'm a little confused how to create or save PNG graphs in SAS. Normally, we would have been to create RTF or PDF instead but there was sometimes a specific requestment to save as PNG directly. So we need to know how to complete it in SAS when I have a graph generated by SGPLOT or GTL procedure.
Definition of least-squares means (LS means)
This article aims to learn the basic calculation process of least-squares means (LS means).
Conduct an ANCOVA model in R for Drug Trial
This article is to illustate how to conduct an (Analysis of Covariance) ANCOVA model to determine whether or not the change from baseline glucose is affected by treatment significantly. In other words, using ANCOVA to compare the adjusted means of two or more independent groups while acounting for one or more covariates.
Capturing statistic tables from SAS procedure - SASlearner
As a new SAS user, a common question that is always asked and searched on google is: how can I get the statistic into a table?
Combine RTF files into one file
This post is just a note referred from one article as shown below that I think would be beneficial for anyone who is as new as I am, as this requirement is fairly common in pharamaceutical programming.
Post-hoc and ad-hoc of statistical analysis in clinical trials
一些过往学习的记录,均是参考和摘抄了一些网上的资料,无法保证描述的准确性。。。
http://onbiostatistics.blogspot.com/2009/01/data-dredging-vs-data-mining-post-hoc.html
SAS 数据集操作
Symbols count in article: 2.4k Reading time ≈ 2 mins.
How to insert blank rows - SASlearner
If you'd like to add one blank row in your report, as shown below:
Example of SDTM and ADaM datasets from the CDISC
Here is to present a set of SDTM and ADaM datasets from CDISC pilot projects as resources for R develpment and programming.
File and Directory Manipulation - SAS&R
In this article, we are going to present how to work with files and folders in R and SAS.
Bland-Altman Analysis
The Bland-Altman analysis is the most common method of assessing the agreement in method comparison in IVD CT or CE trials.