search for: manliyanrhelp

Displaying 17 results from an estimated 17 matches for "manliyanrhelp".

2009 Mar 04
5
how to create many variables at one time?
Hi: I need to create many variables at one time,how to do this in R? for eg ,X1,X2.......X100? Thanks~ [[alternative HTML version deleted]]
2008 Jun 04
3
create many variables at one time~
I need to create 100 variable ,whose name is id.1,id.2~~~~id.100 then I need to let a vector say id<-c(id.1,id.2....id.100) any easy way to do this? thanks a lot~ [[alternative HTML version deleted]]
2008 Jun 19
1
try to find the MLE of a function
Hi everyone: I have a density function f(x|theta)=theta*x^(theta-1),where 0<x<1,0<theta<infinite I want to pratice on R to find the MLE of this function,here is my code: x <- (0:10)/10 f<-function(theta) prod(theta*x^(theta-1)) mle(f) and r gave me :Error in eval(expr, envir, enclos) : argument is missing, with no default what mistake I just made?and how to add a
2008 Jun 04
2
linear model in the repeated data type~
here is the data: y<-c(5,2,3,7,9,0,1,4,5) id<-c(1,1,6,6,7,8,15,15,19) t<-c(50,56,50,56,50,50,50,60,50) table1<-data.frame(y,id,t)//longitudinal data what I want to do is to use the linear model for each id ,then get the estimate value,like: fit1<-lm(y~t,data=table1,subset=(id==1)) but ,you can see the variable "id" is quite irregular,they are not arranaged in order
2008 Jun 04
1
how to extract a specific group of data from a table?
a table with three varialbe:treatment (low,high),size(large,small),response y I want all response y with treatment=low and size=large, I try to write as : treatment<-c("low","low","high","high") size<-c("small","large","small","large") y<-c(1,2,4,5) table1<-data.frame(treatment,size,y)
2008 Jun 04
1
linear model with the repeated data type~
here is the data: y<-c(5,2,3,7,9,0,1,4,5) id<-c(1,1,6,6,7,8,15,15,19) t<-c(50,56,50,56,50,50,50,60,50) table1<-data.frame(y,id,t)//longitudinal data the above is only part of data. what I want to do is to use the linear model for each id ,then get the estimate value,like: fit1<-lm(y~t,data=table1,subset=(id==1)) but ,you can see the variable "id" is quite
2008 Jun 18
3
multiple multiplication in R
hi: just a very simple quesion,how to do multiple multiplication in R x<-c(1,2,3,4,5,6) how to get 1*2*3*4*5*6? I checked the Arithmetic Operators in R,but did not found the operators for this function,anyway can do this except the loop? [[alternative HTML version deleted]]
2008 Jun 05
1
quite complicated case(the repeated data arranage~)
Hi everyone: I have been struggling with this repeated data type for whole afternoon,I sent two emails to server for help,many people kindly responded , hereby thank you so much,but since I dont want to write to much in email,so I divide the problem in parts,so far this seem did not work out very well,so this is my whole problem~ first I have example of data here:
2009 Mar 10
5
Cholesky Decomposition in R
Hi everyone: I try to use r to do the Cholesky Decomposition,which is A=LDL',so far I only found how to decomposite A in to LL' by using chol(A),the function Cholesky(A) doesnt work,any one know other command to decomposte A in to LDL' My r code is: library(Matrix) A=matrix(c(1,1,1,1,5,5,1,5,14),nrow=3) > chol(A) [,1] [,2] [,3] [1,] 1 1 1 [2,] 0 2 2
2008 Jun 04
1
column and row
<-fit1$coefficients y.control y.low y.high (Intercept) 19.628713 21.883999 20.023814 log(1 + (age - 45)/10) -7.383725 -6.017342 -5.084431 here is my outcome,I need one vector say b1=first row without the intercept ,like:(19.628713, 21.883999, 20.023814) and another b2=second row without the log(1 + (age - 45)/10),only the data,how to do this in R?
2008 Jun 05
1
sorting the data~
id<-c(1,1,1,1,3,3,3,7,7,7,7,11,11,11........) how to sort this kind of data to id:(1,1,1,1,2,2,2,3,3,3,3,4,4,4.........) thanks~ [[alternative HTML version deleted]]
2008 Jun 17
0
some r code for linear mixed model
Hello everyone: I have some quesions about the R code for linear mixed model,hope some one can give me some hints,thanks a lot~ Say: we have A B C three factors (i)A is fixed ,B and C are random,and B is nested in C,so the R code for this case would be: case1<-lme(y~A+B+C+......,random=~B|C) where "B|C" actually mean B is nested in C, is it correct? (ii)and if I update
2009 Mar 11
0
anyone can help me with Cholesky Decomposition
Hi: what I want to do is decompose the a symmetric matrix A into this form A=LDL' hence TAT'=D,T is inverse of (L)and T is a lower trangular matrix,and D is dignoal matrix for one case A=1 1 1 1 5 5 1 5 14 T=inverse(L)= 1 0 0 -1 1 0 0 -1 1 D=(1,4,9) I tried to use chol(A),but it returns only trangular, anyone know the function can return
2009 Aug 20
3
how to categorize continuous variable when useing regression
assume dependent variable y( continuous),independent variable x ( continuous),I try to categorize x with some interval,such that,those intervals would has most significant different effect on y. any one knows which method I should apply,I really need some hints,thanks so much~ [[alternative HTML version deleted]]
2009 Mar 06
3
how to omit NA without using ifelse
I have a 50*50 matrix,some entry are NAs,I want to replace these NA by 0,so can I use some syntax to do so other than using ifelse? I tried to use replace(a,NA,0),it didnt work~~(a is matrix name) Thanks~ [[alternative HTML version deleted]]
2008 Jun 23
1
problem in R for Linear mixed model~
Dear R users: I just got confused some R code used in linear mixed model~ example,two factors,A, B,C,A is fixed ,B,C are random,and B is nested in C,if I wannt to use linear mixed model,are the following code correct for each case? case1:want to know random effect of B, case1<-lme(y~A*B*C,random=~B|C) where "B|C" stand for what?,mean B is nested in C? case2: how to wirte
2009 Apr 11
2
who happenly read these two paper Mohsen Pourahmadi (biometrika1999, 2000)
http://biomet.oxfordjournals.org/cgi/reprint/86/3/677 biometrika1999 http://biomet.oxfordjournals.org/cgi/reprint/94/4/1006 biometrika2000 Hi All: I just want to try some luck. I am currenly working on my project,one part of my project is to reanalysis the kenward cattle data by using the method in Mohsen's paper,but I found I really can get the same or close output as he did,so,any