similar to: column and row

Displaying 20 results from an estimated 2000 matches similar to: "column and row"

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 26
3
bug in nls?
Dear all Nobody responded to my previous post so far so I try with more offending subject. I just encountered a strange problem with nls formula. I tried to use nls in cycle but I was not successful. I traced the problem to some parse command. Here is an example DF<-data.frame(x=1:10, y=3*(1:10)^.5+rnorm(10)) coef(lm(log(DF[,2])~log(DF[,1]))) (Intercept) log(DF[, 1]) 0.7437320
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 Nov 07
2
2^2 factorial design question
Dear R Gurus: How do you put together a 2^2 (or even 2^k) factorial problem, please? Since you have 2 levels for A and B, do you put in "A+" and "A-" as factors, please? Thanks, Edna Bell
2009 Apr 16
2
Help- extracting values
I have csv files imported in r each with 2 columns and many many rows. I have sorted the data in them but want to extract some values. The first column is an ID The second is a p-value ( now sorted in increasing order with NA's last) I want to extract the rows with a p-value of less than 0.05) What commands would help the table is called AnovaSort with column headings MCI & p-value Many
2008 May 14
2
is there any graphic function
hello: is there any graphic function under R that allow me to add an interval on the graphic's picture at any place i want. i mean by interval the symbol "|----|" showed verticaly and has as middle the point M with coordinates (yi,ti).please answer me as soon as possible. -- View this message in context: http://www.nabble.com/is-there-any-graphic-function-tp17240811p17240811.html
2009 Feb 24
2
Syntax in taking log to transfrom the data to fit Gaussian distribution
Hi, I have a data set (weight) that does not follow the Gaussian (Normal) distribution. However, I have to transform the data before applying the Gaussian distribution. I used this syntax and used log(weight) as: posJy.model<-glm(log(weight) ~ factor(pos), family=gaussian(link='identity'), subset=Soil=="Jy"). This syntax COULD NOT transform the data. But if I transform the
2008 Jun 26
3
using contour() with x,y,z data?
Hello list, I'm new to R and I have a problem :-) Below is what my data file that looks like. I tried to import and contour this data by doing this: cv_data <- read.table("cv_data.csv",sep=",",header=TRUE) attach(cv_data) contour(x,y,z) I get the error "Error in contour.default(x,y,z) : increasing 'x', and 'y' values expected" I
2008 May 30
1
Aggregation and the meaning of class
Dear R-ers, My aggregation saga continues. Using the following sequence, I can calculate any statistic for row groups and merge the result back to all associated rows ... > WM = by( D60, D60[ "KeyProfA"], FUN=function(x) weighted.mean( x$IAC, x$Wt)) > D60$IAC.WM = as.numeric( WM[ D60$KeyProfA]) > class( WM) [1] "by" Questions ... 1) Is this a reasonable way
2009 Apr 02
2
finding best fitting model
Hello, Is there a function in r to find the best fitting model for a set of data? I would like to know if my data are related exponentially,linearly or if there is a logarithmic correlation between my x and y values. To get a better imagination I've added the graphics at the end of this mail as an attachment. Thanks, Ben --
2008 Apr 21
4
matrix problem
Hi Everyone, I am running into a problem with matrices. I use R version 2.4.1 and an older version. The problem is this: m<-matrix(ncol=3,nrow=4) m[,1:3]<-runif(n=4) That does what I expect; it fills up the rows of the matrix with the data vector > m [,1] [,2] [,3] [1,] 0.2083071 0.2083071 0.2083071 [2,] 0.5865763 0.5865763 0.5865763 [3,] 0.7901782 0.7901782
2008 May 27
2
Write function multiple tests and write summary table
Dear R community, I am not experienced in writing functions and need your help to understand the strategy to face the following problem: I have a group of independent numerical variables, let's say a<-c(1,3,2,6,9,2,2,3,4,1) b<-c(2,3,3,4,5,6,2,1,1,6) c<-c(0,2,4,4,7,6,7,1,2,2) d<-c(0,0,0,1,0,2,1,3,1,2) e<-c(9,2,3,1,1,1,0,2,5,6) and a grouping variable,
2013 Feb 08
3
On p-values presented in the summary of Linear Models
Dear list members I have a doubt on how p-values for t-statistics are calculated in the summary of Linear Models. Here goes an example: x <- rnorm(100,50,10) y <- rnorm(100,0,5) fit1<-lm(y~x) summary(fit1) summary(fit1)$coef[2] # b summary(fit1)$coef[4] # Std. Error summary(fit1)$coef[6] # t-statistic summary(fit1)$coef[8] # Pr(>|t| summary(fit1)$df [2] # degrees of freedom #
2005 Jul 21
1
About object of class mle returned by user defined functions
Hi, There is something I don't get with object of class "mle" returned by a function I wrote. More precisely it's about the behaviour of method "confint" and "profile" applied to these object. I've written a short function (see below) whose arguments are: 1) A univariate sample (arising from a gamma, log-normal or whatever). 2) A character string
2012 Nov 08
2
Comparing nonlinear, non-nested models
Dear R users, Could somebody please help me to find a way of comparing nonlinear, non-nested models in R, where the number of parameters is not necessarily different? Here is a sample (growth rates, y, as a function of internal substrate concentration, x): x <- c(0.52, 1.21, 1.45, 1.64, 1.89, 2.14, 2.47, 3.20, 4.47, 5.31, 6.48) y <- c(0.00, 0.35, 0.41, 0.49, 0.58, 0.61, 0.71, 0.83, 0.98,
2009 Apr 15
2
AICs from lmer different with summary and anova
Dear R Helpers, I have noticed that when I use lmer to analyse data, the summary function gives different values for the AIC, BIC and log-likelihood compared with the anova function. Here is a sample program #make some data set.seed(1); datx=data.frame(array(runif(720),c(240,3),dimnames=list(NULL,c('x1','x2','y' )))) id=rep(1:120,2); datx=cbind(id,datx) #give x1 a
2009 Jun 26
3
code that will use two data sets which differ in size.
Hi all, This is a really basic question but I can't figure it out. I am trying to write a piece of code that will  use two datasets, z and m.. This code is meant to assign the mean of selected values in dataset m to a new column z$c in datset z but the rows and columns of the two data sets differ. I managed to write this down but think I am missing something standard but basic,I will really
2011 Mar 25
2
A question on glmnet analysis
Hi, I am trying to do logistic regression for data of 104 patients, which have one outcome (yes or no) and 15 variables (9 categorical factors [yes or no] and 6 continuous variables). Number of yes outcome is 25. Twenty-five events and 15 variables mean events per variable is much less than 10. Therefore, I tried to analyze the data with penalized regression method. I would like please some of the
2011 Jan 24
5
Train error:: subscript out of bonds
Hi, I am trying to construct a svmpoly model using the "caret" package (please see code below). Using the same data, without changing any setting, I am just changing the seed value. Sometimes it constructs the model successfully, and sometimes I get an ?Error in indexes[[j]] : subscript out of bounds?. For example when I set seed to 357 following code produced result only for 8
2004 Jun 11
1
comparing regression slopes
Dear List, I used rlm to calculate two regression models for two data sets (rlm due to two outlying values in one of the data sets). Now I want to compare the two regression slopes. I came across some R-code of Spencer Graves in reply to a similar problem: http://www.mail-archive.com/r-help at stat.math.ethz.ch/msg06666.html The code was: > df1 <- data.frame(x=1:10, y=1:10+rnorm(10))