[R] Sample size of longitudinal and skewed data

Greg Snow Greg.Snow at imail.org
Wed Mar 23 20:18:52 CET 2011


You can use simulation:

1. Simulate a dataset from what you believe the distribution and relationship to be.
2. Analyze the simulated data in the manner you plan
3. Determine if the results are significant

Repeat the above many times keeping track of the sifnificances.  The percent significant is your power.  The replicate function is very useful for doing this.

-- 
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111


> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Lao Meng
> Sent: Monday, March 21, 2011 1:20 AM
> To: R help
> Subject: [R] Sample size of longitudinal and skewed data
> 
> Hi all:
> I have a question about the sample size calculation.
> 
> It's a pilot study,which includes 2 groups(low,high),3 time point(3,6,9
> monthes).Each person has 3 results which according to the
> 
> 3 time points.So it's a longitudinal study.
> 
> I want to calculate the minimum sample size from the pilot study, but
> can't
> find the solution since the data is highly skewed and
> 
> it's a longitudinal study or multi-level model,which can't use common
> algorithm.
> 
> Any suggestions from you are welcome.
> 
> 
> The demo data is as follow:
> 
> id group time result
> a low       3      0
> a low      6       0
> a low      9      3
> b low     3       0
> b low     6     0
> b low     9     5
> c high   3     0
> c high   6   10
> c high   9   80
> d high   3   50
> d high  6 65
> d high  9 100
> ... ...
> 
> 
> Thanks for your help.
> 
> My best.
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list