Displaying 12 results from an estimated 12 matches for "laomeng_3".
2015 Feb 07
3
how to draw paired mosaic plot?
...riables:
>
>x<-sample(LETTERS[1:3],20,TRUE)
>y<-sample(LETTERS[24:26],20,TRUE)
>mosaicplot(table(x,y))
>
>If you could tell us how the above is not what you want, perhaps a
>better suggestion will appear.
>
>Jim
>
>
>On Sat, Feb 7, 2015 at 6:29 PM, meng <laomeng_3 at 163.com> wrote:
>> If both x and y are all character, paired scatter plot is a little bit strange I think.
>>
>>
>>
>>
>>
>>
>> --
>> QQ: 1733768559
>>
>>
>>
>>
>>
>> At 2015-02-06 23:52:34,"Duncan...
2012 Dec 30
4
How to multiple the vector and variables from dataframe
hi all:
Here's a dataframe(dat) and a vector(z):
dat:
x1 x2 x3
0.2 1.2 2.5
0.5 2 5
0.8 3 6.2
> z
[1] 10 100 100
I wanna do the following:
10*x1,100*x2,1000*x3
My solution is using the loop for z and dat(since the length of z is the same as ncol of dat),which is tedious.
I wanna an efficient solution to do it .
Any help?
Many thanks!
My best
2013 Mar 14
2
question about nls
Hi,all:
I met a problem of nls.
My data:
x y
60 0.8
80 6.5
100 20.5
120 45.9
I want to fit exp curve of data.
My code:
> nls(y ~ exp(a + b*x)+d,start=list(a=0,b=0,d=1))
Error in nlsModel(formula, mf, start, wts) :
singular gradient matrix at initial parameter estimates
I can't find out the reason for the error.
Any suggesions are welcome.
Many thanks.
[[alternative HTML
2013 Mar 09
2
quesion about lm function
Hi all:
My data is in the attachment.
I want to analysis the mean difference of y between 2 sex.
My code:
result_lm<-lm(y~factor(sex) + x1 + x2)
summary(result_lm)
The result of "factor(sex)m" 136.83, is the mean difference of y between 2 sex,and the corresponding p value is 0.07618.
My question is: how to get the mean y of sex(m) and sex(f) respectively via lm function?
Many
2013 Jun 01
1
error about MCA
Hi,all:
I want to perform multiple correspondance analysis via MCA{FactoMineR}.
The data is in the attachment.
My code:
dat<-read.delim("e:\\mydata.txt",header=T)
MCA(dat,quanti.sup=7,quali.sup=1:6)
Error in `[.data.frame`(tab, , i) : undefined columns selected
My question:
Why does the error happen?
Many thanks.
Best.
-------------- next part --------------
An embedded and
2012 Dec 24
1
How to do it through 1 step?
A data set(dat),has 2 variables: x and a, and 100 rows.
I wanna add 2 variables,and call the new data set dat1:
var1:f = a/median(a)
var2:x_new = x*f
My solution:
dat1<-transform(dat,f = a/median(a),x_new = x*f)
But gets error reply which says that "f" is not exits since dat has no variables called "f".
So I have to do through 2 steps:
2015 Feb 06
3
how to draw paired mosaic plot?
Hi all:
If there are two numeric variable:x,y, and I can get paired scatter plot by function "pairs".But if x and y are character, and I want to get paired mosaic plot,which function should be used then?
Many thanks!
My best.
--
QQ: 1733768559
[[alternative HTML version deleted]]
2013 Feb 25
1
quesion about SS of ANOVA
Hi all:
I have a quesion about ANOVA: Is SS(Sum of Square) of a specific factor constant with the number of factors changing?
dat1 includes one factor g1,and g1's SS is called SS_g1_dat1.
dat2 includes two factors g1,g2,and g1's SS is called SS_g1_dat2.
My quesion is: Is SS_g1_dat1 equals to SS_g1_dat2?
I have both "yes" and "no" reasons for the quesion,but
2013 Mar 13
1
multi-comparison of means
Hi all:
I have a question about multi-comparison.
The data is in the attachment.
My purpose:
Compare the predicted means of the 3 methods(a,b,c) pairwisely.
I have 3 ideas:
#idea1
result_aov<-aov(y~ method + x1 + x2)
TukeyHSD(result_aov)
diff lwr upr p adj
b-a 0.845 0.5861098 1.1038902 0.0000001
c-a 0.790 0.5311098 1.0488902 0.0000002
c-b -0.055 -0.3138902
2013 Jan 04
2
a question about the computation of expression
Hi all:
I have a question about the computation of expression:
y = 1+(2x1+2)-3*(5x1-1)+(3x2+3)-2*(x2-1)
The result of y is:
y = 11-13x1+x2
How can I compute the result of y via R function?
Many thanks!
My best.
[[alternative HTML version deleted]]
2013 Oct 07
0
plotting the predict values of time series
Hi all:
I met a question about plotting the predict values of time series.
The data is treering which belongs to R.
I want to predict the next 3 years(1980,1981,1982) result.
pred<-predict(ar(treering),n.ahead=3)
plot(treering)
lines(pred$pred,col="red",lwd=3)
I can only find a little bit red point at the end of the plot,but can't see it clearly.
Maybe I should
2013 Apr 24
2
Regression on stratified count data
Hi all:
For stratified count data,how to perform regression analysis?
My data:
age case oc count
1 1 1 21
1 1 2 26
1 2 1 17
1 2 2 59
2 1 1 18
2 1 2 88
2 2 1 7
2 2 2 95
age:
1:<40y
2:>40y
case:
1:patient
2:health
oc:
1:use drug
2:not use drug
My purpose:
Anaysis whether case and