similar to: lm/model.matrix confusion (? bug)

Displaying 20 results from an estimated 6000 matches similar to: "lm/model.matrix confusion (? bug)"

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
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
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
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)
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
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.
2018 Dec 15
0
Documentation examples for lm and glm
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(). I would go even further and say that the examples that are in lm() now should stay at the top. Because people may be used to
2018 Dec 17
0
Documentation examples for lm and glm
Thanks for the discussion. I do feel quite strongly that the variables should always be a part of a data frame. Then functions such as summary() and pairs() can operate on them all simultaneously.... regression is only one part of the analysis. And what if there are lots of variables? Have them all scattered about the workspace? One of them could be easily overwritten. The generic predict() will
2011 Aug 04
2
Graphical option to update.packages in development version (build of the 2011-07-31 r56569) for Windows not working properly
Dear R-core/development-team, The problem noted in the subject-line has been a problem in the last three development versions of R for Windows that I have downloaded and tested, the most recent of them being a version I downloaded this morning. Update.packages() using the graphical option, i.e. called as update.packages(ask='graphics', checkBuilt=TRUE) does not work as it should, but
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
2003 Sep 24
1
Graph window is not available any more
Hi all, I have currently been using the book Modern Applied Statistics with S from Venables and Ripley. At chapter 6 on Linear Statistical models I wanted to produce the plot as shown by "Figure 6.1" using Whiteside's data. xyplot command seems not to work on my version of "R"(version 1.7.0) running on different environments (Win XP, Win 98 and Win 2000). I then used 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
2018 Dec 14
7
Documentation examples for lm and glm
FWIW, before all the examples are changed to data frame variants, I think there's fairly good reason to have at least _one_ example that does _not_ place variables in a data frame. The data argument in lm() is optional. And there is more than one way to manage data in a project. I personally don't much like lots of stray variables lurking about, but if those are the only variables out
2008 Feb 15
1
Re storing a UPDATES on a data.frame
Hello everyone, Can anyone tell me how do I restore data in a data.frame provided by base R libraries (MASS) ? I uninstalled R then installed it again and I still see the new changes I made!!!??? (eg. whiteside$Temp=1 ==> 1 overwrote all the rows, I want the old values :( !! Please HELP! -- View this message in context:
2016 May 02
5
C6 Firefox 45.1 segmentation faults
I think this site is always failing. It has an embedded video. http://www.sportsnet.ca/basketball/nba/free-association-podcast-much-toronto-raptors-fear-miami-heats-dwayne-wade-hassan-whiteside-joe-johnson/ I tried looking at the output of strace firefox > fferrors.txt 2>&1 grep ENOENT fferrors.txt hope that helps Note: I also have ffmpeg with nux's repo installed On Mon, May
2009 Feb 09
2
cwhmisc package requests update all the time!
Dear Christian, Every single time check update package, ?cwhmisc? always requests updating. I?m aware that the package was latest updated in CRAN on 20Nov2008. Is there anything wrong with my R library or somethingelse? I use R 2.8.1 on Window XP service pack 2 Regards Nguyen Garvan Institute of Medical Research Sydney, Australia
2011 Aug 17
3
getNativeSymbolInfo("user_unif_rand") returns different results on windows and linux
Hi, When loading a package that provides the user-supplied RNG hook user_unif_rand, calling getNativeSymbolInfo("user_unif_rand") returns informations about the loaded symbol. I am using this to identify which package currently provides the RNG hook. The results are the same on windows and linux if only one library provides the hook. If one loads a second package that provides this
2008 Apr 24
1
Calling R functions with multiple arguments from C
Hi, I'm writing a C function that has to call a R function with multiple arguments. I've read the relevant section in Writing R Extensions, and searched the R site, mailing lists as well as rseek. I managed to call the function, but I'm now having trouble creating the argument list. I tried to create a pairlist of the arguments and send it to the R function. The R function however