similar to: Question about 'text' (add lm summary to a plot)

Displaying 20 results from an estimated 9000 matches similar to: "Question about 'text' (add lm summary to a plot)"

2006 Nov 07
3
question on multilevel modeling
Hi, I am trying to run a multilevel model with time nested in people and people nested in dyads (3 levels of nesting) by initially running a series of models to test whether the slope/intercept should be fixed or random. The problem that I am experiencing appears to arise between the random intercept, fixed slope equation AND. (syntax: rint<-lme(BDIAFTER~BDI+WEEK+CORUMTO,
2006 Nov 21
4
means over factors in mlm terms
I'm trying to write a function to find the means over factors of the responses in a mlm (something I would do easily in SAS with PROC SUMMARY). The not-working stub of a function to do what I want is below, and my problem is that I don't know how to call aggregate (or some other function) in the context of terms in a linear model extracted from a lm/mlm object. means.mlm <-
2010 Oct 30
1
summary.lm for post-hoc tests
Let's say I've run Anova(lm(y~a*b)) and found the a:b interaction to be significant. Now I'm interested in which specific level combinations of a and b significantly differ from the control group. Can I use the t-tests from summary(lm(y~a*b)) to answer that question? I saw no mention of multiple comparison in the documentation for summary.lm, so am I right in assuming I need to
2004 Oct 27
1
writing lm summary to file?
Hi, I want to write the summary from a regression. I am doing this because I do not see a way of get the std error, tvalues from the coefficients diagnostic. n$coef does not give this only get the intercept and slope. I tried to use write and write.table and got error in both cases. I jumped thru the hoops below to no avail. Also note, this is in windows. I used to use unix, and do not
2006 Apr 25
1
summary.lme: argument "adjustSigma"
Dear R-list I have a question concerning the argument "adjustSigma" in the function "lme" of the package "nlme". The help page says: "the residual standard error is multiplied by sqrt(nobs/(nobs - npar)), converting it to a REML-like estimate." Having a look into the code I found: stdFixed <- sqrt(diag(as.matrix(object$varFix))) if (object$method
2012 Jul 30
2
distance matrix and hclustering
Dear R Users,i am very new to R. I want your help on an issue regarding distance matrix and cluster analysis i had discharge data of 4 rivers(a,b,c,d) in 4 vectors each having 364 values > dput(qmu)structure(list(a = c(0.26, 0.25, 0.25, 0.25, 0.24, 0.23, 0.22, 0.21, 0.21, 0.21, 0.2, 0.19, 0.19, 0.19, 0.19, 0.18, 0.18, 0.18, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17, 0.17,
2006 Mar 10
4
How to get the intercept from lm?
Hi I am using R 2.2.0 under SuSE 10 I want to use lm() to get the slope and intercept for several daatasets and store them in a database. So far so good - but how do I extract the slope and the intercept from the result from lm()? my code looks like this: lmNNDens <- lm(log(DensNN$MeanNN) ~ log(DensNN$MeanDensity)) anovaLM <- anova(lmNNDens) Results$slope[No] <- ???lmNNDens???
2007 Aug 07
1
lm( ) for log10-transformed data
Dear help-list, I would like to perform a linear regression on the log10 of the two vectors ov.mag.min and res.600nm. The slope and intercept of the regression I use to plot a wider range of ov.mag.min in a double log plot. For a linear regression on only tow points, wouldn't I expect the results for two.points.min to match pretty exactly res.600nm? It does not seem to be the case here.
2007 Nov 18
3
Linear Regression with lm Forcing the Slope to Equal 1
Is there a way to do a linear regression with lm (having one predictor variable) and constrain the slope of the line to equal 1? Tom -- View this message in context: http://www.nabble.com/Linear-Regression-with-lm-Forcing-the-Slope-to-Equal-1-tf4828804.html#a13815432 Sent from the R help mailing list archive at Nabble.com.
2002 Oct 03
2
lm fitting with a specified slope
Is there an easy way to do a linear model with an a priori known slope? In essence, I want to minimize the residuals around a line of known slope. -R -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the
2006 May 19
1
Weird LM behaviour
Dear R users, experimenting with the lm function in R, I've encountered some behaviour I don't understand with my limited knowledge of regression. I made a data-'set' of three measurements (see syntax below). Using lm (linear model) to fit the regression-line, I expected to find an intercept of 2.0 and a slope of 0, but in fact the slope is slightly below zero. Amazed by
2009 Oct 09
2
lm output
Hi All I am running a linear regression using the lm object. In the event that my independent variable is the same across all observations the regression slope is returned as an NA. For example, if I have the following y=c(10,12,17) x=c(5,5,5) lm = lm(y~x) produces the following Coefficients: (Intercept) x 13 NA Other than post-processing the results, is
1998 Jul 13
1
R-beta: accessing SEs from lm object
If I do fit<-lm(y~x) Is it possible to access the SE of the slope? (Analogous to getting the slope like this: fit$coef[2]) If not, it would be handy. (I want SE of 1/slope, and an approx way is fit$se[2]/(fit$coef[2]^2)) Thanks for any help. Bill Simpson -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2008 Jul 17
1
Newbie's question about lm
Hello, I would like to fit data with the following formula : y=V*(1+alpha*(x-25)) where y and x are my data, V is a constant and alpha is the slope I'm looking for. How to translate this into R-language ? At the moment, I only know : lm(y ~ x) Sorry for such a basic question. I thought I could find the solution in a post but I have to confess that, up to know, I'm not able to understand
2011 Sep 28
2
apply lm function to dataset split by two variables
Dear all, I am not fluent in R and am struggling to 1) apply a lm to a weight-size dataset, thus the model has to run separately for each species, each year; 2) extract coefs, r-squared, n, etc. The data look like this: year sps cm w 2009 50 16 22 2009 50 17 42 2009 50 18 45 2009 51 15 45 2009 51 16 53 2009 51 17 73 2010 50 15 22 2010 50 16 41 2010 50 16 21 2010
2013 May 15
1
x and y lengths differ
I have a problem with R. I try to compute the confidence interval for my df. When I want to create the plot I have this problem: Error in xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths differ. I try this code: library(dplR) df.rwi <- detrend(rwl = df, method = "Spline",nyrs=NULL) write.table(df.rwi,file="rwi.txt",quote=FALSE,row.names=TRUE)
2002 Nov 22
3
simple test on slope of lm()
Hello I want to compare the slope (let's say 'b') of a linear model obtained with lm() to a theoretical value (let's say 'th'). To do so, I think I should compute a 't value' using something like : (b - 'th')/standard.deviation(b) and then look at the p-value of this computed t. I don't understand how to do this in a simple way, just using lm()
2002 May 21
3
how to extrac one coef from lm at a time
Hello R-Users, I have I simple question that I could not solve: How to extract the elevation and the slope values from a linear model (lm) separately? coef(model.lm) gives both of them. Thanks, Antonio Olinto -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info",
2000 Sep 26
3
lm -- significance of x coefficient when I(x^2) is used
In "Modern Applied Statistics with S-Plus" 3rd ed., footnote on page 153 regarding a model lm(Gas~Insul/(Temp+I(Temp^2))-1,whiteside), I read "Notice that when the quadratic terms are present, first degree coefficients mean 'the slope of the curve at temperature zero', so a non-significant value does not mean that the linear term is not needed.
2011 Oct 24
1
using predict.lm() within a function
I've written a simple function to draw a regression line in a plot and annotate the line showing the slope with a label. It works, as I'm using it, when the horizontal variable is 'x', but gives incorrect results otherwise. What's wrong? # simple function to show the slope of a line show.beta <- function(model, x="x", x1, x2, label, col="black", ...)