similar to: Environment of a LM created in a function

Displaying 20 results from an estimated 10000 matches similar to: "Environment of a LM created in a function"

2010 Dec 13
1
predict.lm[e] with formula passed as a variable
Dear all, In a function I paste a string and convert it to a formula which I pass to lm[e]. The idea is to write a function which takes the name of the response variable and the explanatory variable and the data frame as an argument and calculates an lm[e]. (see example below) This works fine, but if I want to make a prediction on this model, R complains that the object holding the formula
2002 Jun 07
2
Hope fo help - functions, fits and for cycles
I need a little piece of advice concerning passing data frames into the functions. As I do a lot of similar fits at a time, I'd like to write a small function doing the fits for all relevant variables automatically. However, I usually get error messages of the following kind: (I present here a part of a test code). ##################################################### # Data set:
2005 Apr 13
1
lm() with many responses
Hi all, I have one array of predictors, one observation per row, and one array of responses, also arranged one observation per row. I arrange these into a data.frame and call lm() with a pasted-together formula. I would like to call lm() with a number of responses in excess of 100, but for some reason, 39 seems to be a limit. Why do I get an "invalid variable names" error from
2012 Jun 19
1
weird --no 'dimnames' attribute for array-- error for R lordif package
Hi All, ? I am trying to use the lordif package in R and can't figure out the reason for the above error when I try to run the calctheta() function. ################## # read data using foreign package - must be Stata 11 or earlier racedata<- read.dta("race.dta")??? # item responses resp.data<-racedata[,-c(1:2)] # grouping variable is in the second column
2014 Dec 13
2
samba & Oracle ACFS Issues
Hi there In an Oracle RAC cluster using ACFS (as file-system) where we have a samba server for sharing files to windows clients, we are suffering a strange issue, from time to time, which it causes the Windows clients lock for a while (10 min or a bit more) or even indefinitely when they are working with the share resource, and sometimes we have to re-start the samba service to come back to
2011 Jan 12
1
graphics: 3D regression plane
Hello Masters, wishing you all a great 2011 I was also going to ask if anyone knows a quick and efficient way to plot a regression plane (z~x*y). I have tried the regr2.plot{HH} function but it is only an educational tool and has poor graphical properties. I also tried to run the following script on a fictitious longitudinal problem, with poor results set.seed(1234)
2006 Aug 24
3
generating an expression for a formula automatically
Hi! I would like to be able to create formulas automatically. For example, I want to be able to create a function that takes on two values: resp and x, and then creates the proper formula to regress resp on x. My code: fit.main <- function(resp,x) { form <- expression(paste(resp," ~ ",paste(x,sep="",collapse=" + "),sep="")) z <-
2011 Nov 10
1
Sum of the deviance explained by each term in a gam model does not equal to the deviance explained by the full model.
Dear R users, I read your methods of extracting the variance explained by each predictor in different places. My question is: using the method you suggested, the sum of the deviance explained by all terms is not equal to the deviance explained by the full model. Could you tell me what caused such problem? > set.seed(0) > n<-400 > x1 <- runif(n, 0, 1) > ## to see problem
2005 Sep 06
2
Predicting responses using ace
Hello everybody, I'm a new user of R and I'm working right now with the ACE function from the acepack library. I Have a question: Is there a way to predict new responses using ACE? What I mean is doing something similar to the following code that uses PPR (Projection Pursuit Regression): library(MASS) x <- runif(20, 0, 1) xnew <- runif(2000, 0, 1) y <- sin(x) a <- ppr(x, y,
2013 Oct 18
2
pamer.fnc y la nueva versión de R
Javier, Creo que aquí aplica la ley de Linus que dice: "Dado un número suficientemente elevado de ojos, todos los errores se convierten en obvios". La persona que revisa y encuentra un error no necesariamente tiene que ser la misma que la que lo escribe. Una motivación muy importante al compartir un código es la de recibir los beneficios del control de calidad por parte de tus pares.
2014 Dec 16
2
Fwd: samba & Oracle ACFS Issues
On Tue, Dec 16, 2014 at 03:40:08PM +0100, Nacho del Rey wrote: > Hi there > > In an Oracle RAC cluster using ACFS (as file-system) where we have a samba > server for sharing files to windows clients, we are suffering a strange > issue, from time to time, which it causes the Windows clients lock for a > while (10 min or a bit more) or even indefinitely when they are working >
2013 Jan 10
1
help with knit_hooks
Dear R-listers, does anybody can suggest some manual where I can learn more about how the hooks in knitr work? I am trying to enclose the output of an R command in the Latex verbatim environment. I defined a hook as follows: knit_hooks$set(fsverb = function(x, options) { paste("\\begin(verbatim)\n", x, "\\end(verbatim)\n", sep = "") } then I set a chunk as
2016 Apr 04
9
RFC: Constant folding math functions for long double
Hi, Clang is currently unable to constant fold calls to math.h functions such as logl(), expl() etc. The problem is that APFloat doesn't have these functions, so Clang is forced to rely on the host math library. Because long double isn't portable, we only ever query the host math library for double or float results. I can see three methods for allowing constant folding for types that
2005 Sep 05
1
convergence for proportional odds model
Hey, everyone, I am using proportional odds model for ordinal responses in dose-response experiments. For some samll data, SAS can successfully provide estimators of the parameters, but the built-in function polr() in R fails. Would you like to tell me how to make some change so I can use polr() to obtain the estimators? Or anyone can give me a hint about the conditions for the existance of MLE
2013 Oct 18
0
pamer.fnc y la nueva versión de R
Gracias a todos por las recomendaciones. Ya me he puesto en contacto con el autor y le explicado donde esta el error. Es tan fácil como que han cambiado la estructura de los objetos tipos lmer desde la versión 2.15.3 con lo que su paquete dejo de funcionar. Por suerte la nueva estructura conserva por lo menos la parte necesaria para hacer sus funciones. Se localizar el fallo y como arreglarlo, lo
2006 Aug 10
5
Variance Components in R
Hi, I'm trying to fit a model using variance components in R, but if very new on it, so I'm asking for your help. I have imported the SPSS database onto R, but I don't know how to convert the commands... the SPSS commands I'm trying to convert are: VARCOMP RATING BY CHAIN SECTOR RESP ASPECT ITEM /RANDOM = CHAIN SECTOR RESP ASPECT ITEM /METHOD = MINQUE (1) /DESIGN
2012 May 15
1
Error in eval(expr, envir, enclos) : object 'Rayos' not found???
Hi R-listers, I am trying to make a trellis boxplot with the HSuccess (y-axis) in each Rayos (beach sections) (x-axis), for each Aeventexhumed (A, B, C) - nesting event. I am not able to do so and keep receiving: Error in eval(expr, envir, enclos) : object 'Rayos' not found Please advise, Jean require(plyr) resp <- read.csv("ABC Arribada R File Dec 12 Jean
2014 Nov 25
2
[PATCH v4 38/42] virtio_scsi: v1.0 support
Note: for consistency, and to avoid sparse errors, convert all fields, even those no longer in use for virtio v1.0. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/linux/virtio_scsi.h | 32 +++++++++++++++------------- drivers/scsi/virtio_scsi.c | 51 ++++++++++++++++++++++++++++----------------- 2 files changed, 49 insertions(+), 34 deletions(-) diff --git
2014 Nov 25
2
[PATCH v4 38/42] virtio_scsi: v1.0 support
Note: for consistency, and to avoid sparse errors, convert all fields, even those no longer in use for virtio v1.0. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- include/linux/virtio_scsi.h | 32 +++++++++++++++------------- drivers/scsi/virtio_scsi.c | 51 ++++++++++++++++++++++++++++----------------- 2 files changed, 49 insertions(+), 34 deletions(-) diff --git
2012 Sep 29
1
Unexpected behavior with weights in binomial glm()
Hi useRs, I'm experiencing something quite weird with glm() and weights, and maybe someone can explain what I'm doing wrong. I have a dataset where each row represents a single case, and I run glm(...,family="binomial") and get my coefficients. However, some of my cases have the exact same values for predictor variables, so I should be able to aggregate up my data frame and