similar to: Problem using GLM in a loop

Displaying 20 results from an estimated 100 matches similar to: "Problem using GLM in a loop"

2001 Aug 21
0
Re: [R] Problem using GLM in a loop (fwd)
This example is caused by R's messing with formula environments. That's explained in ?formula, but should it not be explained in ?model.frame ? Simple test: data <- data.frame(y=rnorm(100), x=1:100) testit <- function(formula) { weights <- runif(100) glm(formula, weights=weights, data=data) } testit(y ~ x) weights is looked for in the environment of the formula, not of
2011 Jun 27
1
group interaction in a varying coeff. model (mgcv)
Dear UseRs, I built varying coefficient models (in mgcv) for two groups separately, with one explanatory and one moderator variable (see the example below). # ------- #  Example: # ------ # generate moderator variable (can the same for both groups) modvar <- c(1:1000) # generate group1 values x1 <- rnorm(1000) y1 <- scale(cbind(1,poly(modvar,2))%*%c(1,2,1)*x1 + rnorm(1000,0,0.3)) #
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 :
2000 Oct 16
2
Crash while R111 install
Hello, I try to install the R111 version for few days on my PC (on Windows NT), and every time the same problem : I start the rwin.exe application and a couple of seconds later, the install failed, and my PC is down. I must then swich it down and restart a new session. If someone has some help ... Thanks -- Isabelle Zabalza-Mezghani Tel : 01 47 52 61 99 Institut Fran?ais du P?trole
2003 Sep 24
3
Problem with memory for large datasets
Hello, I would like to know if there is a possibility to "clean" the R memory during a R session. In fact, I realize a lot of instruction with large objects (matrix of 500*5000), and I can not manage to achieve the end of my script due to memory lack. Of course, I've tried to remove all "temporary object" during the script execution and to perform a garbage collector ...
2001 Nov 08
3
Problem with optim (method L-BFGS-B)
Hello, I've just a little problem using the function optim. Here is the function I want to optimize : test_function(x){(exp(-0.06751 + 0.25473*((x[1]-350)/150) + 0.04455*((x[2]-40)/20) + 0.09399*((x[3]-400)/100) - 0.17238*((x[4]-250)/50)- 0.45984*((x[5]-550)/150)-0.39508*((x[1]-350)/150)* ((x[1]-350)/150) - 0.05116*((x[2]-40)/20)* ((x[2]-40)/20) - 0.27735*((x[3]-400)/100)*((x[3]-400)/100) -
2003 Apr 08
3
density ranges for uniform law
Hello, I would have some details and explanations about the results I get. In fact, I start with a uniform sample between -1 and 1, and then plot its density. My problem is that the density ranges are much more longer than I expected : samp <- runif(10000,-1,1) plot(density(samp)) Instead of varying between -1 and 1, the density varies between approximaly -1.5 and 1.5 Could someone explain
2000 Oct 19
2
Multiple outputs of a function
Hello everybody, I'm writting some functions for experimental designs. The one I'm working on is similar to "fac.design" on Splus. The problem I have is with the form of the output : When the argument fraction is submitted, Splus gives something like : A B C 1 - - - 2 + + - 3 + - + 4 - + + Fraction : ~A:B:C The first part of this output is the
2001 Jan 10
1
Package Java for R
Hello R-users, I would like to install the Java package delivered by the Omegahat project. I'm working on a Windows NT4.0 workstation. Can someone explain me ( in details please) the way to install this package. I've already read the doc relative to this topic, but I'm afraid to be too bad in Informatic to understand really well the install process. I hope someone has an answer for
2002 Nov 07
2
Qualitative factors
Hi, I have some doubt about how qualitative factors are coded in R. For instance, I consider a response y, a quantitative factor x and a qualitative factor m at 3 levels, generated as follow : y_c(6,4,2.3,5,3.5,4,1.,8.5,4.3,5.6,2.3,4.1,2.5,8.4,7.4) x_c(3,1,3,1,2,1,4,5,1,3,4,2,5,4,3) m_gl(3,5) lm(y~x+m) Coefficients: (Intercept) x m2 m3 3.96364 0.09818
2002 Oct 25
1
Problem when fitting a constant response
Hello, I would like to treat a very simple case : to fit a linear model with 5 parameters (including main terms, interactions and quadratic terms using a central composite design with 27 runs) for a constant response (e.g resp = 100.0). The fitting process works and return me a good intercept value (the value of my constant) and some negligeable effects (around e-15). But, I don't understand
2003 May 13
1
Dopt for Windows
Hi, I would like to have some advise about how to install Dopt on R for Windows. I can not manage to properly compile Dopt.f anf to get a suitable dll for R. Can someone explain me step by step what should I do ? Thanks in advance Isabelle Zabalza-Mezghani
2003 Jun 27
1
A vector or matrix response
Hello, I wonder if anybody has some idea about how to solve my problem : I am working , I would say trough an experimental design approach (perform experiments, get responses, make regression, sensitivity analysis, risk analysis ...). The problem is now that I have to face with not only a response but a vector or a matrix (typically a spatial distribution of a physical property ... pressure).
2003 Sep 19
1
predict for mlm does not work properly
Hello, I've just fitted a model with multi-responses, and I get an object of class "lm" "mlm". My problem is that as soon as I invoke the predict method for a dataframe "newdata", the methods runs and give me back prediction at the fitting points but not for newdata. Does someone has an explanation for this behavior, and some ideas to make predict.mlm work
2003 Oct 16
2
Managing memory on R
Hi, I have a problem with the memory size within R. I would like to know if there is any may for getting back free memory during a R session. I've tried with rm and gc but it still craches. I am working on windows R1.3.1. I know I have big datasets, but during my study, some results are temporary, and I would like to get back the memory allocated to this temporary object as soon as I remove
2003 Oct 27
1
Starting and Terminating the JVM for package SJava
Hello, I would like to know if there is a possibility to open an R session via Java (using the SJava package), then to terminate it, and re-run another. It seems not to be possible. If this is the case, I would like to understand where is the problem or the limitation (is it due to the SJava implementation, to the Java behavior, or to the R application). In fact, I am interesting in re-starting
2000 Nov 13
1
DLL for calling Fortran subroutines
Hi everybody, I'm trying to use fortran subroutines in a R function. I've generated a DLL file using my fortran subroutines, and I've got a DLL which includes an export table with the names of my subroutines. Then, I use the R command library(test), where test is a directory located in the R library tree and which contains a R directory (with my R functions) and a libs directory (with
2002 Feb 27
1
Bug in glm.fit? (PR#1331)
G'day all, I had a look at the GLM code of R (1.4.1) and I believe that there are problems with the function "glm.fit" that may bite in rare circumstances. Note, I have no data set with which I ran into trouble. This report is solely based on having a look at the code. Below I append a listing of the glm.fit function as produced by my system. I have added line numbers so that I
2004 Jun 23
1
How to define stopping criterium for Optim with L-BFGS-B
Hi, I am using optim with a L-BFGS-B method to minimize a function. As I've understood, the way to specify a tolerance for stopping optimization is through "factr" argument. My function, is by construction, minimal when equal to 1. I wonder if there is any way to pass this info to "optim". If not, how "factr" argument works (I am quite confused about the
2003 Sep 24
1
R binary version for 1.6.2
Hello, I would like to know where I can find a Windows binary version of R 1.6.2, since I want to test the last SJava library (which has been built under 1.6.2) which does not work on R 1.7.1 I've already search on the CRAN web site but on the r1070 page, if I click on 'old', I get an error. Thanks in advance, Isabelle Isabelle Zabalza-Mezghani IFP - Reservoir Engineering