search for: lmobj

Displaying 11 results from an estimated 11 matches for "lmobj".

2010 Jul 20
1
Transformation of Y changes the 'lm' object?
Hi R, This is a problem, which I have tried to present in a simple way: Let, x1=1:10 x2=2:11 y=2+3*x1 lm_obj=lm(y~x1+x2) lm_obj step(lm_obj) # Step function for the first time y=y^0.1 lm_obj step(lm_obj) #Step function after a transformation on Y, but 'lm_obj' is not modified. The two step function behave differently. The first one is before the
2007 Mar 20
5
abline within data range
Dear R helpers, I would like to have abline, for a lm model for example, lying within data range. Do you know how to get it? Thank in advance Nguyen D Nguyen #CODE x<- rnorm(200, 35,5) y<- rnorm(200, 0.87,0.12) plot(y~x, xlim=c(0,50), pch=17, bty="l") abline(lm(y~x)) # I would like abline is between min(x) and max(x) [[alternative HTML version deleted]]
1997 Oct 17
1
R-beta: more model.matrix
I am trying to show some techniques to my graduate regression class. The textbook mentioned using bootstrap samples of regression coefficients for assessing variability. I decided to show them reasonably effective ways of doing the resampling. The following is a function I wrote to create bootstrap samples of coefficients from a fitted linear regression model. bsCoefSample <- ##
1997 Aug 25
0
R-alpha: R FAQ
...39;' created when cube() was invoked is also looked in: R> cube(2) [1] 8 The following more `realistic' example illustrating the differences in scoping is due to Thomas Lumley <thomas@biostat.washington.edu>. The function jackknife.lm <- function(lmobj) { n <- length(resid(lmobj)) jval <- t(apply(as.matrix(1:n), 1, function(i) coef(update(lmobj, subset = -i)))) (n - 1) * (n - 1) * var(jval) / n } does something useful in R, but does not work in S. In order to make it work in S...
2009 Jan 30
2
Regression
Hello, I have problem I have a, and b in regression then I can't plot x,y with (and) a, b lines can you help me ? thx [[alternative HTML version deleted]]
2009 Sep 28
4
Running an ANOVA with a BY
I have a simple 1 way anova coded like summary(ANOVA1way <- aov(Value ~ WellID, data = welldata)) How can I use the BY function to do this ANOVA for each group using another variable in the dataset?? I tried coding it like this, but it doesn't seem to work. summary(ANOVA1way <- by(welldata, Analyte, function(x) aov(Value ~ WellID, data = welldata))) In SAS I would code it like this:
1997 Dec 09
3
R-beta: R FAQ v0.60
...' created when cube() was invoked is also looked in: R> cube(2) [1] 8 The following more `realistic' example illustrating the differences in scoping is due to Thomas Lumley <thomas at biostat.washington.edu>. The function jackknife.lm <- function(lmobj) { n <- length(resid(lmobj)) jval <- t(apply(as.matrix(1:n), 1, function(i) coef(update(lmobj, subset = -i)))) (n - 1) * (n - 1) * var(jval) / n } does something useful in R, but does not work in S. In order to make it work in S...
1997 Dec 09
3
R-beta: R FAQ v0.60
...' created when cube() was invoked is also looked in: R> cube(2) [1] 8 The following more `realistic' example illustrating the differences in scoping is due to Thomas Lumley <thomas at biostat.washington.edu>. The function jackknife.lm <- function(lmobj) { n <- length(resid(lmobj)) jval <- t(apply(as.matrix(1:n), 1, function(i) coef(update(lmobj, subset = -i)))) (n - 1) * (n - 1) * var(jval) / n } does something useful in R, but does not work in S. In order to make it work in S...
1997 Dec 09
3
R-beta: R FAQ v0.60
...' created when cube() was invoked is also looked in: R> cube(2) [1] 8 The following more `realistic' example illustrating the differences in scoping is due to Thomas Lumley <thomas at biostat.washington.edu>. The function jackknife.lm <- function(lmobj) { n <- length(resid(lmobj)) jval <- t(apply(as.matrix(1:n), 1, function(i) coef(update(lmobj, subset = -i)))) (n - 1) * (n - 1) * var(jval) / n } does something useful in R, but does not work in S. In order to make it work in S...
2010 Nov 26
0
contour figure from rsm
Dear r users, I wanted to perform contour figure from response surface model result. I typed this: > model = rsm (Index ~ SO(NV, SKLON, pH), bonita) > summary(model) > par(mfrow = c(2, 3)) > contour (model, ~NV+SKLON+pH) However, I got the error answer as follows: Error in lmobj$data[, nm] : object of type 'environment' is not subsettable Has someone any suggestions to solve this? Thanks to all, Michal _________________________________________________________ Michal Bosela National Forest Centre - Forest Research Institute Zvolen Department of Forest Inventory...
2012 Jul 26
2
Working with Numbers generated from Regression Output
Hi, I have a query on regression output generated by R. > result=lm( Y~X , data=trail) > summary(result) After running this 2 statements the following output is generated. Call: lm(formula = Y ~ X, data = trail) Residuals: Min 1Q Median 3Q Max -245.30 -90.77 -30.30 54.99 532.78 Coefficients: Estimate Std. Error t value Pr(>|t|)