similar to: lm -- significance of x coefficient when I(x^2) is used

Displaying 20 results from an estimated 20000 matches similar to: "lm -- significance of x coefficient when I(x^2) is used"

2008 Mar 05
1
testing for significantly different slopes
Hi, How would one go about determining if the slope terms from an analysis of covariance model are different from eachother? Based on the example from MASS: library(MASS) # parallel slope model l.para <- lm(Temp ~ Gas + Insul, data=whiteside) # multiple slope model l.mult <- lm(Temp ~ Insul/Gas -1, data=whiteside) # compare nested models: anova(l.para, l.mult) Analysis of Variance
2007 Dec 12
3
lm/model.matrix confusion (? bug)
Dear List-members, Hopefully someone will help through my confusion: In order to get the same coefficients as we get from the following ## require (MASS) summary ( lm(Gas ~ Insul/Temp - 1, data = whiteside) ) ...................... we need to do the following (if we use model.matrix to specify the model) ## summary ( lm(Gas ~ model.matrix(~ Insul/Temp - 1) - 1, data = whiteside) )
2010 Feb 08
3
What is the equivalent function in R to xyplot in S?
Page 140 of MASS uses the function xyplot. But I don't find it in R. Is there a package that I should load to use xyplot. Or there is a function with a different name in R that does the same thing as xyplot in S. xyplot(Gas ~ Temp | Insul, whiteside, panel = function(x, y, ...) { panel.xyplot(x, y, ...) panel.lmline(x, y, ...) }, xlab = "Average external temperature (deg. C)", ylab
2009 Mar 22
3
data analysis. R
so i am having this question what should i do if the give data file (.txt) has 4 columns, but different lengths? how can i read them in R? any idea for the following problem? Gas consumption (1000 cubic feet) was measured before and after insulation was put into a house. We are interested in looking at the effect of insulation on gas consumption. The average outside temperature (degrees celcius)
2002 Jun 19
1
superscripts in xyplot labels
R-helpers; I tried to get a superscripted 3 in the following xyplot example but failed: >data(whiteside) >xyplot(Gas ~ Temp | Insul, whiteside, panel = function(x, y, ...) { panel.xyplot(x, y, ...) panel.lmline(x, y, ...) }, xlab = "Average external temperature (deg. C)", ylab = paste(paste("Gas consumption (1000", expression(ft^3),")"), aspect
2018 Dec 15
2
Documentation examples for lm and glm
A pragmatic solution could be to create a simple linear regression example with variables in the global environment and then another example with a data.frame. The latter might be somewhat more complex, e.g., with several regressors and/or mixed categorical and numeric covariates to illustrate how regression and analysis of (co-)variance can be combined. I like to use MASS's whiteside
2018 Dec 16
3
Documentation examples for lm and glm
On Sat, 15 Dec 2018, frederik at ofb.net wrote: > I agree with Steve and Achim that we should keep some examples with no > data frame. That's Objectively Simpler, whether or not it leads to > clutter in the wrong hands. As Steve points out, we have attach() > which is an excellent language feature - not to mention with(). Just for the record: Personally, I wouldn't recommend
2009 Mar 24
3
confidence interval or error of x intercept of a linear regression
Hello all, This is something that I am sure has a really suave solution in R, but I can't quite figure out the best (or even a basic) way to do it. I have a simple linear regression that is fit with lm for which I would like to estimate the x intercept with some measure of error around it (confidence interval). In biology, there is the concept of a developmental zero - a temperature under
2013 May 05
1
slope coefficient of a quadratic regression bootstrap
Hello, I want to know if two quadratic regressions are significantly different. I was advised to make the test using step 1 bootstrapping both quadratic regressions and get their slope coefficients. (Let's call the slope coefficient *â*^1 and *â*^2) step 2 use the slope difference *â*^1-*â*^2 and bootstrap the slope coefficent step 3 find out the sampling distribution above and
2008 Jul 26
2
Beginning lm
I have ussed lm to generate a basic line correlation: fit = lm(hours.of.sleep ~ ToSleep) Note: From "Bayesian Computation with R", Jim Albert, p. 7 I understand the simple y = mx + b line that this fits the data to. Now apparently I don't understand formulas. The documentation indicates that there is an implied "intercept" in the formula so now I want to try and fit the
2008 Feb 23
3
using subset() in data frame
R folks, As an R novice, I struggle with the mystery of subsetting. Textbook and online examples of this seem quite straightforward yet I cannot get my mind around it. For practice, I'm using the code in MASS Ch. 6, "whiteside data" to analyze a different data set with similar variables and structure. Here is my data frame: ###subset one of three cases for the variable
2011 Jul 19
1
notation question
Dear list, I am currently writing up some of my R models in a more formal sense for a paper, and I am having trouble with the notation. Although this isn't really an 'R' question, it should help me to understand a bit better what I am actually doing when fitting my models! Using the analysis of co-variance example from MASS (fourth edition, p 142), what is the correct notation for the
2001 Jan 04
6
regression constraints?
gday R gurus, I have a multivariate regression for which I want to constrain the coefficients to be > 0. Is this possible? I've check the doco and searched CRAN but can't find anything. thanks, John Strumila -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send
2010 Apr 11
2
simple question about contrasts, lm and factors
I have a data frame with two variables that are factors. One is actually a TRUE/FALSE factor, and I have coded it as 1/0, a continuous variable, but I could turn it back into a factor. The second is an ordered factor and consists of five timepoints. There are several continuous variables as well. Now I want to fit a linear model to my data, using lm (or another R procedure if recommended).
2005 Aug 08
2
coefficient of polynomial expansion
Hi, I would like to get the coefficient of polynomial expansion. For example, (1+ x)^2 = 1 + 2x + x^2, and the coefficients are 1, 2 and 1. (1 + x + x^2)^3 = 1 + 3*x + 6*x^2 + 7*x^3 + 6*x^4 + 3*x^5 + x^6, and the coefficients are 1, 3, 6, 7, 6, 3, and 1. I know that we can use polynom library. Is there any other way to do it without loading a library. Thanks a lot for your help. Peter
2002 Aug 20
1
About lm()
Dear Mr. and Mrs. I'm very grateful for these software and this list. My question is: when a use linear multiple regression (lm()) for my data, abundance ichthyoplankton ~ salinity + temperature + month of the year(f1 is a factor: 1 for january, 2 for february, ..., 12 for december), the summary() of results is ... Coefficients: Estimate Std. Error t value Pr(>|t|)
2010 Mar 04
1
Setting graphical parameters
Hi guys... I have problem with this excersise... Consider the pressure data frame again. (a) Plot pressure against temperature, and use the following command to pass a curve through these data: > curve((0.168 + 0.007*x)?(20/3), from=0, to=400, add=TRUE) (b) Now, apply the power transformation y3/20 to the pressure data values. Plot these transformed values against temperature. Is a linear
2009 Apr 03
2
Linear model, finding the slope
Hi for some data I working on I am merely plotting time against temperature for a variable named filmclip. So for example, I have volunteers who watched various film clips and have used infared camera to monitor the temperature on their face at every second of the clip. The variable names I have used are Normalised ( for the temperature) and Frame (for the time in seconds). So I have fitted a
2008 Dec 09
3
Significance of slopes
Hello R community, I have a question regarding correlation and regression analysis. I have two variables, x and y. Both have a standard deviation of 1; thus, correlation and slope from the linear regression (which also must have an intercept of zero) are equal. I want to probe two particular questions: 1) Is the slope significantly different from zero? This should be easy with the lm
2013 Apr 23
1
Writing contrast statements to test difference of slope in linear regressions
Hi Everyone, I am uncertain that I am writing the contrast statements correctly. Basically, I'm unsure when to use a -1 and a 1 when writing the contrasts. Specifically I am interested in comparing the slopes between different temperature regimes. Temperature is therefore a factor. Time and percent are numerical. Using the gmodels package I made the following model: