time1 = 2008-03-09
time2 = 2010-9-10
How to compute how many years between time1 and time2?
Thanks!
best
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
t2-t1 is ok,but only can getTime difference of 786 days,but I wanna get
the 786 only.How can I do then?
Thanks!
2011/11/11 Lao Meng laomen...@gmail.com
time1 = 2008-03-09
time2 = 2010-9-10
How to compute how many years between time1 and time2?
Thanks!
best
[[alternative HTML
as.numeric() is work
Settled!
2011/11/11 Lao Meng laomen...@gmail.com
t2-t1 is ok,but only can getTime difference of 786 days,but I wanna get
the 786 only.How can I do then?
Thanks!
2011/11/11 Lao Meng laomen...@gmail.com
time1 = 2008-03-09
time2 = 2010-9-10
How to compute how many
Hi all:
If I have a dataframe of N columns.If I wanna get the min(or max,or
mean...etc)of the whole dataframe,how to do it quickly?
What I can do is only:
min(data[,1:ncol(data)])
Any other suggestion?
Thanks!
best
[[alternative HTML version deleted]]
:57, schrieb Lao Meng:
Thanks Eik.
As to your words:The intercept in lm is tested against 0 (one sample
t-test)
So, I perform the following test:
t.test(extra[group==1],mu=0)
Since goup1 is regarded as reference,I do the 1-sample ttest based on
group1's mean vs 0.
But the result
Yes, you remind me of this!
Thanks!
2011/8/16 Eik Vettorazzi e.vettora...@uke.uni-hamburg.de
Hi Lao,
you tried to reinvent the wheel. Have a look at ?tapply
tapply(sleep$extra,sleep$group,mean)
Cheers
Am 16.08.2011 09:41, schrieb Lao Meng:
Hi all:
My data:data(sleep)
If I wanna
- number of
parameters) degrees of freedom.
cc-s1$coef[(Intercept),1:2]
2*(1-pt(cc[1]/cc[2],df=18))
hth.
Am 16.08.2011 07:25, schrieb Lao Meng:
Hi all:
I have a question about lm on t-test.
data(sleep)
I wanna perform t-test to test the difference between the 2 groups:
I
...1k
---
Sent from my phone. Please excuse my brevity.
Lao Meng laomen...@gmail.com wrote:
The mean of group1 is 0.75,just the same as intercept.
Acturally,R treated group1 as reference,so intercept is just group1
Hi all:
My data:data(sleep)
If I wanna calculate each group's extra,what I can do is:
#method1
attach(sleep)
mean(extra[group==1])
mean(extra[group==1])
#method2
result-matrix(,0,2)
g-split(sleep,sleep$group)
for(i in 1:length(g))
{
Sorry,I miss a word:If I wanna calculate each group's mean extra
2011/8/16 Lao Meng laomen...@gmail.com
Hi all:
My data:data(sleep)
If I wanna calculate each group's extra,what I can do is:
#method1
attach(sleep)
mean(extra[group==1])
mean(extra[group==1])
#method2
result-matrix
Hi all:
I have a question about lm on t-test.
data(sleep)
I wanna perform t-test to test the difference between the 2 groups:
I can use:
t.test(extra~group)
The t.test result shows that:t = -1.8608; mean1=0.75,mean2=2.33
But I still wanna use:
summary(lm(extra~group))
Intercept=0.75,which
#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---
Sent from my phone. Please excuse my brevity.
Lao Meng laomen...@gmail.com wrote:
Hi all:
I have a question about lm on t-test.
data(sleep)
I wanna perform t-test
Here's another question:
What's kind of difference does glht tests?
In other words,
If I get 4 intercepts and 4 slopes for all levels of GROUP,then glht tests
for the difference of the 4 intercepts or 4 slopes,or something else?
Thanks.
2011/7/27 Lao Meng laomen...@gmail.com
Yes.
According
Hi all:
There's a question about glht function.
My data:data_ori,which inclue CD4, GROUP,time.
f_GROUP-factor(data_ori$GROUP)
f_GROUP is a factor of 3 levels(0,1,2,3)
result - lme(sqrt(CD4) ~ f_GROUP*time ,random = ~time|ID,data=data_ori)
glht(result, linfct = mcp(f_GROUP=Tukey) )
Error in
Yes.
According to your suggestion,I modified my code.It works well.
Thanks you very much.
My best.
2011/7/26 Peter Ehlers ehl...@ucalgary.ca
On 2011-07-26 00:16, Lao Meng wrote:
Hi all:
There's a question about glht function.
My data:data_ori,which inclue CD4, GROUP,time.
f_GROUP
Hi all:
I have a question about linear mixed model.
my linear mixed model with randomized slope and intercept with interaction
of time and group(g1,g2,g3):
model- glmmPQL(log10(CD4) ~ time + factor(group)+ time:factor(group),
random = ~time|id)
What I get is only the main and interaction of time
If I have 3 groups,and for each group,I get the ratio(e.g. incidence rate).
Now I wanna compare 3 ratio pairwise,and get the corresponding p values,i.e:
group1 vs group2 ,p value=?
group1 vs group3 ,p value=?
group2 vs group3 ,p value=?
Which statistical test should be used?
Thanks a lot for
Hi all,I have some questions about the covariants of regression.
My target: To explore the trend of CD4 level through a period of time.
Response variable: CD4 count
Explanatory variable:time
Also, the demology information is available,such as gender,occupation,income
level...
Q1,Are these
(High).
2011/6/28 David Winsemius dwinsem...@comcast.net
On Jun 27, 2011, at 10:02 PM, Lao Meng wrote:
Hi all,I have some questions about the covariants of regression.
My target: To explore the trend of CD4 level through a period of time.
Response variable: CD4 count
Explanatory
You may try xyplot
2011/5/20 1Rnwb sbpuro...@gmail.com
Hello gurus,
I have a dataframe containing two groups viz., 'control' and 'case', each
of
these groups contains longitudinal data for 100 subjects. I have to plot
all
these subjects on a single chart and then put a regression line
Hi all:
Which function or package can perform competitive risk model?
Thanks a lot!
My best
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
You may try the following to perform anova:
anova(lm(y~x))
or
summary(aov(y~x))
2011/4/13 Ubuntu Diego ubuntu.di...@gmail.com
Hi all,
I have a very easy questions (I hope). I had measure a property of
plants, growing in three different substrates (A, B and C). The rest of the
hi:
Another question abour overdispersion test.
I wanna make sure that:
if p value0.05,then the data is NOT overdispersion;
if p value=0.05,then the data IS overdispersion.
I'm not sure whether it's true,just get the above conclusion from simulated
data.
Thanks for your help.
2011/4/2
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
Hi all:
I have a question on sample size calculation of 2 groups of data. If 2
groups of data are all normal distribution, then I can use the function
n.indep.t.test.eq from samplesize package.But if 2 groups of data are all
skewed distribution, but not normal distribution,how can I calculate the
No,even there's only one observation,boxplot can still be drawn.
x-1
boxplot(x)
or
x-1:3
boxplot(x)
...
2011/3/9 Dennis Murphy djmu...@gmail.com
Hi:
A box plot is based on a five number summary, so you need at a minimum five
observations (and preferably at least twice that) to make a
You may try analysis of covariance.
But,as you sayThere are no gender differences in age ,then why not combine
2 gender's age and ignore the gender?
2011/3/1 Jonathan DuBois jonathan.m.dub...@gmail.com
Hi,
I am new to R, so I am unsure of the formula to set up this analysis.
I would like to
Thanks!
It works well.
2011/2/18 Dimitris Rizopoulos d.rizopou...@erasmusmc.nl
say, 'Dat' is your data frame, then one way to do it is:
with(Dat, tapply(freq, list(hair, eye, sex), c))
I hope it helps.
Best,
Dimitris
On 2/18/2011 8:50 AM, Lao Meng wrote:
The data
Thanks!
It works well.
2011/2/18 Henrique Dallazuanna www...@gmail.com
Try this:
xtabs(Freq ~ Hair + Eye + Sex, Dat)
Using Dimitri's Dat example.
On Fri, Feb 18, 2011 at 5:50 AM, Lao Meng laomen...@gmail.com wrote:
The data is in the attachment.
What I wanna get is:
, , Sex
Well,it's my daily work on duty,not homework:)
2011/2/18 Dennis Murphy djmu...@gmail.com
This is a built-in dataset in R - see ?HairEyeColor and str() it. I smell
homework...
Dennis
On Thu, Feb 17, 2011 at 11:50 PM, Lao Meng laomen...@gmail.com wrote:
The data is in the attachment
The data is in the attachment.
What I wanna get is:
, , Sex = Male
Eye
HairBrown Blue Hazel Green
Black32 1110 3
Brown53 502515
Red 10 10 7 7
Blond 3 30 5 8
, , Sex = Female
Eye
HairBrown Blue Hazel Green
Hi all:
I have 3 questions about the poisson regression of contingency table.
Q1¡¢How to understand the independent poisson processas many books or paper
mentioned?
For instance:
Table1
---
treat canernon-cancersum
Hi all:
I have 3 questions about the poisson regression of contingency table.
Q1¡¢How to understand the independent poisson processas many books or paper
mentioned?
For instance:
Table1
---
treat canernon-cancersum
Hi all:
Here's a question about result of loglinear analysis.
There're 2 factors:area and nation.The raw data is in the attachment.
I fit the saturated model of loglinear with the command:
glm_sat-glm(fre~area*nation, family=poisson, data=data_Analysis)
After that,I extract the coefficients:
-- Forwarded message --
From: Lao Meng laomen...@gmail.com
Date: 2011/1/19
Subject: Re: [R] question about result of loglinear analysis
To: David Winsemius dwinsem...@comcast.net
My command and result are :
result_sat-summary(glm_sat)
result_coe-result_sat$coefficients
Hi all:
I have a dataset which contains two variables: Y and time
y-c(228,189,232,198,252,315)
time-2003:2008
How can I find out the trend(increase/decrease) of y along the time period?
If I use:
lm(y~time)
The lm command treats time as natural number,but not date.
So maybe lm isn't
36 matches
Mail list logo