similar to: "lme" in R and Splus-7

Displaying 20 results from an estimated 8000 matches similar to: ""lme" in R and Splus-7"

2008 Jun 08
3
how to important a date file into R
Hi: I have a data file in the following format. The first three digits stand for the ID of a respondent such as 402, 403. Different respondents may have the same ID. Followed the ID are 298 single digit number ranging from 1 to 5. My question is how to read this data file into R. I tried "scan" and "read" but they do not work because the numbers in the file are not
2006 Jan 31
1
lme in R (WinXP) vs. Splus (HP UNIX)
R2.2 for WinXP, Splus 6.2.1 for HP 9000 Series, HP-UX 11.0. I am trying to get a handle on why the same lme( ) code gives such different answers. My output makes me wonder if the fact that the UNIX box is 64 bits is the reason. The estimated random effects are identical, but the fixed effects are very different. Here is my R code and output, with some columns and rows deleted for space
2006 Jul 01
1
polynomial expansion in R
Hi: I have two vectors of data, x and y and I want to get the "polynomial" expansion of (x+y)^p with any integer power p in R. Suppose p=2, then I want a matrix of five vectors, namely, x y x^2 y^2 x*y. The coefficient of the polynomial is not needed. I can write it manully if p is small. But I want it in the case of p=10 or even bigger, is there any function in R can do that
2006 Nov 22
1
question about the "solve" function in library "Matrix"
Hi: I have some problems when I use the function "solve" function in a loop. In the following code, I have a diagonal martix "ttt" whose elements change in every iteration in a loop. I defined a "dpoMatrix"class before the loop so I do not need to define this class every time in the loop. The reason is to save some computing time. The code is below. The inverse
2005 Mar 09
3
from long/lat to UTM
Hi: Is there any function in R which can convert the long/lat to UTM(Universal Transverse Mercator)? There are quite a few converters on Internet. However, the interface is designed as input->output which I can not convert lots of locations at the same time. Another question is whether there is a function in R which can tell the time zone from the location's lat/long? Thank you!
2005 Aug 29
1
lme and ordering of terms
Dear R users, When fitting a lme() object (from the nlme library), is it possible to test interactions *before* main effects? As I understand, R conventionally re-orders all terms such that highest-order interactions come last - but I??d like to know if it??s possible (and sensible) to change this ordering of terms. I??ve tried the terms() command (from aov) but I don??t know if something
2004 Oct 11
2
memory in R
Hi: I am doing a MCMC algorithm which is well known to consume much computer memory. And I have a problem everytime I run my R program. It stopped at certain iteration and says "can not allocate a vector of 19 kb". It seems that the computer's memory has been exhausted. However, it is said that after each iteration the objects (such as a huge matrix) can be set to NULL. And the
2005 Jul 08
2
time series regression
Hi: I have two time series y(t) and x(t). I want to regress Y on X. Because Y is a time series and may have autocorrelation such as AR(p), so it is not efficient to use OLS directly. The model I am trying to fit is like Y(t)=beta0+beta1*X(t)+rho*Y(t-1)+e(t) e(t) is iid normal random error. Anybody know whether there is a function in R can fit such models? The function can also let me specify
2003 Mar 24
1
APC Modelling and the GLM function
Hi all Apologies for any cross posting. I have encountered a rather bizarre "problem" in Splus and R. I am using Age-Period-Cohort models to model cervical cancer and have run the same data on both R (v.1.4.1 & v1.6.2) and Splus (version 6.0). I used the same command line in both Splus and R: glm(cases~-1+as.factor(age)
2000 Oct 26
2
Problem with lm
Hello Everybody, I have a problem with the output of lm. In fact, when I compare the R output and the Splus output, the results appears to be different : I have a dataframe with 5 factors , 16 rows and a response. First, I tried to fit this response to a linear model : lm(rep~(A+B+C+D+E),data). The results beetween SPlus and R are different. In a second time, I tried a new fit :
2001 Jun 15
1
contrasts in lm and lme
I am using RW 1.2.3. on an IBM PC 300GL. Using the data bp.dat which accompanies Helen Brown and Robin Prescott 1999 Applied Mixed Models in Medicine. Statistics in Practice. John Wiley & Sons, Inc., New York, NY, USA which is also found at www.med.ed.ac.uk/phs/mixed. The data file was opened and initialized with > dat <- read.table("bp.dat") >
2002 Aug 06
2
AOV in MASS not the same??
I would appreciate it if someone could explain the results of the example from the aov() help file. The output given below is different from book Venables and Ripley - MASS The results In R1.5.1 (Under windows) is as follows: > N <- c(0,1,0,1,1,1,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,0,0) > P <- c(1,1,0,0,0,1,0,1,1,1,0,0,0,1,0,1,1,0,0,1,0,1,1,0) > K <-
2003 Feb 14
5
Translating lm.object to SQL, C, etc function
This is my first post to this list so I suppose a quick intro is in order. I've been using SPLUS 2000 and R1.6.2 for just a couple of days, and love S already. I'm reading MASS and also John Fox's book - both have been very useful. My background in stat software was mainly SPSS (which I've never much liked - thanks heavens I've found S!), and Perl is my tool of choice for
2005 Jul 04
1
question about boxplot axis
Hi: I have a question making side by side boxplot. My response is numeric and I want to make a side by side boxplot of it accroding to a factor vector. So, there are several boxplots on the same plot. Each boxplot is with respect to one level for a factor. The levels of the factor are some characters. When I make the plot, the boxplots are arranged according to the alphabetic order of the
2006 Nov 06
1
question about function "gls" in library "nlme"
Hi: The gls function I used in my code is the following fm<-gls(y~x,correlation=corARMA(p=2) ) My question is how to extact the AR(2) parameters from "fm". The object "fm" is the following. How can I extract the correlation parameters Phi1 and Phi2 from "fm"? These two parametrs is not in the "coef" componenet of "fm". Thanks a
2005 Aug 11
1
include C functions from nmath in my own C functions
Hi: I followed the README in src/nmath/standalone/ to make the use the command "make shared" to make the libRmath.so file. I also add the directories containg libRmath.so to LD_LIBRARY_PATH by using command "export D_LIBRARY_PATH=$LD_LIBRARY_PATH:$/home/zhliu/Backup/R-2.0.1/src/nmath/standalon e " However, when I try to run the following codes by the command
2007 Jun 28
2
aov and lme differ with interaction in oats example of MASS?
Dear R-Community! The example "oats" in MASS (2nd edition, 10.3, p.309) is calculated for aov and lme without interaction term and the results are the same. But I have problems to reproduce the example aov with interaction in MASS (10.2, p.301) with lme. Here the script: library(MASS) library(nlme) options(contrasts = c("contr.treatment", "contr.poly")) # aov: Y ~
2000 Apr 07
1
lme questions (was difference between splus and R)
> Date: Fri, 7 Apr 2000 09:55:08 -0400 (EDT) > From: Faheem Mitha <faheem at email.unc.edu> [I have given a more meaningful subject line.] > On Fri, 7 Apr 2000, Prof Brian D Ripley wrote: > > > On Thu, 6 Apr 2000, Faheem Mitha wrote: > > > > > I'm running splus 5 on a solaris platform remotely, and running R on linux > > > on my home machine.
2003 Sep 03
2
lme in R and Splus
Good Day, Included below is some code to generate data and to fit a mixed effects model to this fake data. The code works as expected when I call the function "lme" in Splus but not in R. The error message from calling lme in R is: "Error in getGroups.data.frame(dataMix, groups) : Invalid formula for groups" I installed the nlme package for R around 20 August
2010 Jan 22
4
Inconsistency in as.data.frame.table for stringsAsFactors
I noticed that in as.data.frame.table, the stringsAsFactors argument defaults to TRUE, whereas in the other as.data.frame methods, it defaults to default.stringsAsFactors(). The documentation and implementation agree on this, so this is not a bug. However, I was wondering if this disparity was intended or if it might be some sort of unintentional oversight. If it is intentional, I wonder what