similar to: lm and Formula tutorial

Displaying 20 results from an estimated 10000 matches similar to: "lm and Formula tutorial"

2013 Feb 20
3
NLS results different from Excel -- Tricky fortunes nomination
Folks: I thought the following excerpt from Bruce McCullough's post would be a good candidate for the R fortunes package -- except that it's about Excel, not R! So I nominate it... but leave it to others to say whether it's really "qualified" to be nominated. ---- "The idea that the Excel solver "has a good reputation for being fast and accurate" does not
2011 Nov 02
3
Error: serialization is too large to store in a raw vector
Dear all, I have quite large code (with lapply and mclapply) and I am getting the following error. Error: serialization is too large to store in a raw vector Is it possible to ask from R to extend the Error messages with more details? I would like to see where this problem exists. B.R Alex [[alternative HTML version deleted]]
2012 Mar 19
3
where this Error comes from?
Dear all, While I am executing my code I receive the error below Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) :   'x' must be atomic the weird thing that I am not calling anywhere sort function nor do I rely on anyh sorting. How I can discover where this comes from (inside which function?). I would like to thank you in advance for your help B.R Alex
2011 Nov 25
1
Handling Packages
Dear all, I have two questions regarding packaging. a. What is the inverse action of require(). I want to "detach" one of the two libraries I loaded as there are two functions with the same name and come from two different libraries b. If I do not "detach" the one library how I can refer to the one function and to the second one? B.R Alex [[alternative HTML version
2004 Nov 15
3
glim in R?
After some futile searches, I decided to ask the list to see if any of the sages out there would have an answer: I have a function I wrote a few years ago in S, which calls glim numerous times. I'd like to port it to R, but glm works differently from glim, which takes as part of its input an X design matrix. I probably could write a function to convert glim to glm, but hope this
2010 Oct 06
8
Looking for a book/tutorial with the following context:
Hello everyone. It is time to start writing more and more function and I want to read in a good reference -book ( I can buy one, especially if it is second handed :P) -online tutorial -any other guide -How functions really work in R -How to write bigger R programs -If there are local function variables. -Global ones and how to treat them -How to include function files in order to keep your all
2002 Jan 15
2
returned values of glim() in S PLus and glm() in R
Dear Experts, In glim() of S Plus, one of the returned values is "var", the estimated variance matrix of coefficients. However, in glm() of R (there is no glim() in R), "var" is not one of the returned values. Anyone know what could I get the varience matrix of coefficients in glm() in R? As a novice in R and S+, I'd appreciate your help Sincerely, Charlie Liu
2002 Jan 17
1
weibull in R
Hi all I try to make a weibull survival analysis on R. I know make this on GLIM, and now I try to make the GLIM exercice GLEX8 on R to learning and compare the test. The variables are: time censor group bodymass In GLIM I make: $calc %s=1 $ to fit weibull rather than exponential $input %pcl weibull $ $macro model group*bodymass $endmac$ $use weibull t w %s $ Then, GLIM estimate an alpha for the
2007 Jan 17
2
Effect size in GLIM models
Dear All, I wonder if anyone can advise me as to whether there is a consensus as to how the effect size should be calculated from GLIM models in R for any specified significant main effect or interaction. In investigating the causes of variation in infection in wild animals, we have fitted 4-way GLIM models in R with negative binomial errors. These are then simplified using the STEP procedure,
2012 Sep 13
1
remove all terms with interaction factor in formula
Hi Folks, I'm trying to find a way to remove all terms in a formula that contain a particular interaction. For example, in the formula below, I'd like to remove all terms that contain the b:c interaction. > attributes(terms( ~ a*b*c*d))$term.labels [1] "a" "b" "c" "d" "a:b" "a:c" [7]
2012 Oct 31
1
From summary function to formula
Hi there! I need to generate a final general linear model from a set of coefficients of the variables within the summary function. When I have the summary-function, HOW do I create a final model (response variable = bla bla bla)? LordSword -- View this message in context: http://r.789695.n4.nabble.com/From-summary-function-to-formula-tp4648008.html Sent from the R help mailing list archive at
2006 Feb 03
3
Sharing a Secondary Hard Drive
I just recently installed a second hard drive in my Samba server with the hopes of sharing it with the rest of my home network. It seems like Samba can not get the correct permissions to the drive, however. I have the drive mounted under /media/public, and when I try to map a share directly to it and open the share with a client, I get an NT_STATUS_BAD_NETWORK_NAME error. When I map the
2013 Feb 20
1
NLS results different from Excel
The idea that the Excel solver "has a good reputation for being fast and accurate" does not withstand an examination of the Excel solver's ability to solve the StRD nls test problems. Solver's ability is abysmal. 13 of 27 "answers" have zero accurate digits, and three more have fewer than two accurate digits -- and this is after tuning the solver to get a good
2012 Jul 03
2
Help with lmer formula
Hey all - I am a newbie on mixed-effects models. I want to estimate the following model: Y_it = alpha_0t + alpha_1t*X_it + e_it alpha_0t = gamma_00 + u_0t alpha_1t = gamma_10 + gamma_11*W_it + u_1j Where Y is my outcome, X is my level-1 predictor, and W is my level 2 predictor. I am not sure if I am doing it right. Is this the correct specification of the formula? model = lmer(Y ~ X + X:Y + (
2002 Mar 01
1
glm with binomial errors in R and GLIM
Hi all, In my continuous transition of GLIM to R I try to make a glm with binomial errors. The data file have 3 vectors: h -> the factor that is ajusted (have 3 levels) d -> number of animais alive (the response) n -> total number of animals To test proportion of alive, make d/n. In GLIM: $yvar d$ $error binomial n$ $fit +h$ scale deviance = 25.730 (change = -9.138) at cycle 4
2012 Apr 18
3
how to plot separate lm ablines on the same xyplot by group
Hi, I am trying to use xyplot to plot the relationship between size and day (y~x) by a food factor that has two levels, low and high. I have 3 reps per factor/day. I want the plots from each food treatment on the same axiss, so I used this code: xyplot(Size ~ Day, groups = Food, data = louis.data.means,col=1, pch=c(1,17), panel=function(x,y,groups,...){ panel.superpose(x,y,groups,...)
2012 Jan 09
1
Different lm() Residuals Output
All but one of the summaries of multiple linear regressions in this analysis set present the residuals by min, 1Q, median, 3Q, and max. Example: lm(formula = TDS ~ Cond + Ca + Cl + Mg + Na + SO4, data = snow.cast) Residuals: Min 1Q Median 3Q Max -277.351 -32.551 -2.621 40.812 245.272 The one that doesn't has only a small number of rows (23) and presents the
2013 Mar 05
2
Questions on implementing logistic regression
Hi there, I am trying to write a tool which involves implementing logistic regression. With the batch gradient descent method, the convergence is guaranteed as it is a convex problem. However, I find that with the stochastic gradient decent method, it typically converges to some random points (i.e., not very close to the minimum point resulted from the batch method). I have tried different ways
2012 Jan 29
2
apply lm() to each row of a matrix
Hi, I would like to fit lm-models to a matrix with 'samples' of a dependent variable (each row represents one sample of the dependent variable). The independent variable is a vector that stays the same: y <- c(1:10) x <- matrix(rnorm(5*10,0,1), 5, 10) now I would like to avoid looping over the rows, since my original matrix is much larger; for(t in 1:dim(x)[1]) {
2012 Nov 07
3
extract indep vars from formula
Hello, I'm trying to extract the independent variables from a formula. The closest I've been able to come, aside from rolling my own, is the following: > a = y ~ b * x > attr(terms(formula(a)),"variables") The reason I'm doing this is that I'm building a grid of points that I use to construct a 3-d model prediction surface in rgl. If there are more than two