similar to: Predicting a single observatio using LME

Displaying 20 results from an estimated 100 matches similar to: "Predicting a single observatio using LME"

2008 May 07
1
Automatically generating new column names (and columns)
Once again I need to tap into the collective knowledge here. Let's say I have the following columns and data below Y X1 X2 X3 X4 I would like to generate additional new columns and column names (ie the data would be squared - and I'd like the column names to reflect this) like: Y X1 X2 X3 X4 X1^2 X2^2 X3^2 X4^2 I believe I can compute the values correctly with the code below, but I
2012 May 21
1
Complex text parsing task
Hello Everyone, I have what I think is a complex text parsing task. I've provided some sample data below. There's a relatively simple version of the coding that needs to be done and a more complex version. If someone could help me out with either version, I'd greatly appreciate it. Here are my sample data. haveData <- structure(list(profile_key = structure(c(1L, 1L, 2L, 2L, 2L,
2004 Aug 03
2
lme fitted correlation of random effects: where is it?
The print method for lme *prints out* the fitted correlation matrix for the random effects. Is there any way to get these values as an object in R? I have examined the components of the lme object (called "junk" in the example below) and the components of summary(junk) without finding these numbers. (How I did this: I dumped the entire lme object to a text file and then used egrep to
2006 Jan 09
2
warning message from nlme
Hi all, I tried to do a variance components using nlme, but I got the following warning mesage ##################################################### not meaningful for factors in: Ops.factor(y[revOrder], Fitted) ###################################################### Can someone point out what is the meaning of this warning message? I tried to look at Ops.factor, but I don't
2011 Feb 09
1
Error running LME model
I'm attempting to run an LME model with random intercepts for location and have received an error message. The model and error message are given below: > mixed.distance <- lme (fixed= log(min5inpnc) ~ i93centerline, random=~1|location, data = nosmokecomp) Error in y[revOrder] - Fitted : non-conformable arrays I believe that my dataset may have dimensions that are not working with
2006 Mar 28
3
fixed effects
dear R wizards: X is factor with 20,000*20=800,000 observations of 20,000 factors. I.e., each factor has 20 observations. y is 800,000 normally distributed data points. I want to see how much R^2 the X factors can provide. Easy, right? > lm ( y ~ X) and > aov( y ~ X) Error: cannot allocate vector of size 3125000 Kb is this computationally infeasible? (I am not an expert, but
2010 Oct 25
2
Question on passing the subset argument to an lm wrapper
Hello, How would you go about handling the following situation? This is on R 2.12.0 on Ubuntu 32-bit. I have a wrapper function to lm. I want to pass in a subset argument. First, I just thought I'd use "...". ## make example reproducible set.seed(123) df1 <- data.frame(age = rnorm(100, 50, 10), bmi = rnorm(100, 30, sd = 2)) ## create a wrapper using
2003 May 20
1
Extracting elements from an reStruct
Sorry if this is obvious, but my S skills aren't great and I haven't been able to find it documented anywhere. I want to write a new function for use with lme objects; the function will simply calculate an ICC (aka "rho") for each level of a mixed-effects model. What I need for this is pretty simple: (c(var1..varn, residual)) / sum(c(var1..varn, residual)) where var1..varn
2008 Feb 23
1
Fixed effects
Hello everyone! I would really appreciate it if someone knew where could I find the command in R in order to run a fixed effects regression. What format should my data have? I have looked through the manual and I could not find anything Thank you in advance, Petros [[alternative HTML version deleted]]
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame. For instance > ddTable <- data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry")) I want a dataset that is Id Name 1 Paul 2 Bob > unique(ddTable) Will give me all 4 rows, and > unique(ddTable$Id) Will give me c(1,2), but not accompanied by the name column.
2004 Jul 01
2
Individual log likelihoods of nlsList objects.
Hello all. I was wondering if the logLike.nls() and logLike.nlme() functions are still being used. Neither function seems to be available in the most recent release of R (1.9.1). The following is contained in the help file for logLik(): "classes which already have methods for this function include: 'glm', 'lm', 'nls' and 'gls', 'lme' and others in
2007 Aug 20
1
rv package, rvnorm function
In an attempt to learn to use the rv package, I have been working through the examples in Jouni Kerman and Andrew Gelman's "Using Random Variables to Manipulate and Summarize Simulations in R" (July 4, 2007). I am using a Dell Precision 380n computer running Gentoo Linux and R 2.2.1 (the latest available through Gentoo's portage/emerge system). Everything worked well until I
2007 Jan 30
0
lme : Error in y[revOrder] - Fitted : non-conformable arrays
Greetings R-helpers, I am attempting to fit an lme() while specifying a correlation structure, but I'm getting into trouble long before I get to that point. I am receiving the error: Error in y[revOrder] - Fitted : non-conformable arrays It doesn't seem to matter how simple or complex the model I specify is, it always gives this same error message. This makes me suspect something is
2007 Oct 01
4
Disentagling formulas
I am writing a program in which I would like to take in a formula, change the response (Y) variable into something else, and then pass the formula, with the new Y variable to another function. That is, I am starting with formula <- Y~X1+X2+X3 and I'd like to do something like Y <- formula$Y newY <- f(Y) lm(newY~X1+X2+X3) So far, it seems that my
2004 Jul 05
1
"make" error for R-1.9.1
Hello everybody. I am trying to upgrade from R-1.9.0 to R-1.9.1 on a RedHat linux 2.4.18 system. I get the following error after "tar -xvzf R-1.9.1.tgz ; cd ./R-1.9.1/ ; ./configure" and "make" : [make works for 10 minutes ... snip ...] varExp text html latex varFixed text html latex varFunc
2005 Sep 27
0
Help: A application error and failed just-in-debugging.
Hello all, When I ran my R program in R version 2.1.1 in windows XP and 2000, and I downloaded a package call "MIX", I got an application error: RGui:Rgui.exe - Application Error: The instruction at "0x1009d8a1" referenced memory at "0xbde48f58". The memory could not be "read". Click on ok to terminate the program click on cancel to debug the program
2009 Jun 25
2
Problems with subsets in NLME
I am trying to estimate models with subsets using the NLME package. However, I am getting an error in the case below (among others): > subset <- c(rep(TRUE, 107), FALSE) > fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1, subset=subset) Error in xj[i] : invalid subscript type 'closure' > fm2 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1,
2009 Jul 08
2
\dQuote in packages
I am in the process of submitting a package to CRAN. R CMD check ran successfully on the package on my local computer, using R version 2.1.1. However, on the computers for CRAN (with version 2.10.0), the following errors occurred: Warning in parse_Rd("./man/predict.Rd", encoding = "unknown") : ./man/predict.Rd:28: unknown macro '\dquote' *** error on file
2002 Sep 27
3
? Exact pattern matching in GREP ?
How is exact pattern matching achieved in GREP (and GREPlike) functions ? # Want: listing of all object names that end in *.lm > objects(pattern="*.lm",pos=1) # ... but get: all objects that partially match *.lm, e.g., *.lme [1] "j3.lm" "J3.lme" "j8.lm" "J8.lme" # Want: position of string "4jan2002" in vector >
2009 May 13
3
Checking a (new) package - examples require other package functions
I am creating an R package. I ran R CMD check on the package, and everything passed until it tried to run the examples. Then, the result was: * checking examples ... ERROR Running examples in REEMtree-Ex.R failed. The error most likely occurred in: > ### * AutoCorrelationLRtest > > flush(stderr()); flush(stdout()) > > ### Name: AutoCorrelationLRtest > ### Title: Test for