as.numeric() is work
Settled!
2011/11/11 Lao Meng
> t2-t1 is ok,but only can get"Time difference of 786 days",but I wanna get
> the "786" only.How can I do then?
>
> Thanks!
>
>
> 2011/11/11 Lao Meng
>
>> time1 = 2008-03-09
>> time2
t2-t1 is ok,but only can get"Time difference of 786 days",but I wanna get
the "786" only.How can I do then?
Thanks!
2011/11/11 Lao Meng
> time1 = 2008-03-09
> time2 = 2010-9-10
>
> How to compute how many years between time1 and time2?
>
> Thanks!
&g
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 the
ot the same test. The concept of linear regression applies here
> (and you might take any introductory at your hand to refresh that
> concept). The intercept is estimated from the whole sample not just
> group==1, dfs are 20-2, not sum(group==1)-1!
>
> best regards
>
> Am 17.08.2
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]]
__
st 0 (one sample t-test),
> so the t-statistic is (mean-0)/sd, having n-k (sample size - 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:
>
Yes, you remind me of this!
Thanks!
2011/8/16 Eik Vettorazzi
> 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(slee
Sorry,I miss a word:"If I wanna calculate each group's mean extra"
2011/8/16 Lao Meng
> 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[gro
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))
{
result<-rbind(result,data.frame(unique(g[[i]]$group),mean(g[[
Software/Embedded Controllers) .OO#. .OO#. rocks...1k
> ---
>
> Sent from my phone. Please excuse my brevity.
>
> Lao Meng wrote:
>>
>> The mean of group1 is 0.75,just the same as intercept.
>> Acturally,R trea
d Controllers) .OO#. .OO#. rocks...1k
> ---
>
> Sent from my phone. Please excuse my brevity.
>
> Lao Meng wrote:
>
>> Hi all:
>> I have a question about lm on t-test.
>>
>> data(sleep)
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 is
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
> Yes.
> A
Yes.
According to your suggestion,I modified my code.It works well.
Thanks you very much.
My best.
2011/7/26 Peter Ehlers
> On 2011-07-26 00:16, Lao Meng wrote:
>
>> Hi all:
>> There's a question about glht function.
>>
>> My data:data_ori,which inclu
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
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 yo
ow),M(median),H(High).
2011/6/28 David Winsemius
>
> 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.
>>
>> Respon
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 varia
You may try "xyplot"
2011/5/20 1Rnwb
> 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 for each of
>
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 gui
You may try the following to perform anova:
anova(lm(y~x))
or
summary(aov(y~x))
2011/4/13 Ubuntu Diego
> 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
> conditions remained con
hi:
Another question abour overdispersion test.
I wanna make sure that:
if p value<0.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
> H
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 st
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
> 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 box plot a
> v
You may try analysis of covariance.
But,as you say"There are no gender differences in age ",then why not combine
2 gender's age and ignore the gender?
2011/3/1 Jonathan DuBois
> Hi,
>
> I am new to R, so I am unsure of the formula to set up this analysis.
> I would like to run a linear model wit
Well,it's my daily work on duty,not homework:)
2011/2/18 Dennis Murphy
> 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 wrote:
>
>> The data is in the attac
Thanks!
It works well.
2011/2/18 Henrique Dallazuanna
> Try this:
>
> xtabs(Freq ~ Hair + Eye + Sex, Dat)
>
> Using Dimitri's Dat example.
>
> On Fri, Feb 18, 2011 at 5:50 AM, Lao Meng wrote:
>
>> The data is in the attachment.
>>
>> What
Thanks!
It works well.
2011/2/18 Dimitris Rizopoulos
> 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,
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
Blac
Hi all:
I have 3 questions about the poisson regression of contingency table.
Q1¡¢How to understand the "independent poisson process"as 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 process"as many books or paper
mentioned?
For instance:
Table1
---
treat canernon-cancersum
---
-- Forwarded message --
From: Lao Meng
Date: 2011/1/19
Subject: Re: [R] question about result of loglinear analysis
To: David Winsemius
My command and result are :
> result_sat<-summary(glm_sat)
> result_coe<-result_sat$coefficients
> result_coe
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:
res
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 approp
36 matches
Mail list logo