similar to: How to control plotting formula above lm diagnostic plots?

Displaying 20 results from an estimated 3000 matches similar to: "How to control plotting formula above lm diagnostic plots?"

2012 Jan 24
1
Adding text to multiple plots
Dear R-helpers, I am trying to add an information about the mean value for each variable within each plot by adding text to the multiple plots in this way: par(mfrow=c(2,2)) df$Date <- as.Date(df$Date, format="%d/%m/%Y") for (i in 2:5){ plot(df$Date, df[[i]]) Mean <- mean(na.omit(df[[i]])) text(x=max(na.omit(df[[i]])), labels=paste("Mean = ", Mean,
2004 Feb 02
4
for loops?
Hello R people! How can one use a for loop (or something similar) in R? As I type in each line, I get syntax errors... I'm just confused how much to type in at each ">" prompt. Thanks for your help, cathy ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Catherine M. Stein Research Assistant, Tuberculosis Research Unit Doctoral Candidate in
2013 May 03
2
R does not subset
Hi everyone, I know there have been several requests regarding subsetting before, but none of them really helps with my problem: I'm trying to subset only infected individuals from the REC2 data.frame: > str(REC2) 'data.frame': 362 obs. of 7 variables: $ RINGNO : Factor w/ 370 levels "BL17546","BL17577",..: 78 81 67 41 58 66 17 $ year : Factor w/ 8
2004 Jan 02
2
SEM help!!!
I have just started using the SEM package in R, so I'm not sure I'm doing everything right, but I keep getting an error concerning startvalues and I can't figure out how to fix it. Is anyone willing to read over my code and help me out??? Please email me if you are willing to look at my code and I will send it to you. Thank you so much, and Happy New Year! cathy
2004 Dec 15
4
2 ftp serwers problem
Hello, I have a local network with gateway (192.168.1.1) to internet, it is computer with slackware and shorewall. I have ftp serwer on my gateway computer, serwer is on 21 port and it is accesable for external and internal computers ( from internet and local network ). Today I have installed Serwer on my local machine (192.168.1.6) on port 22019. The serwer is accesable from loal computers in
2005 Aug 30
8
Who can help me?
I have own function wrote. I used an algorithm, which was written in Matlab. in matlab: ... gamma = inv(v)*g; ... #v = matrix of variable size, v=vv(k) => k=2 => dimension of v 2x2 #g = a line vector with 4 elements e.g. g=[1,0,2,0]; my rewritten r-file: ... gamma = solve(v)*g; ... which is my error? Who can help me? thank you in advance. Chris -- Lust, ein paar Euro nebenbei zu
2012 Jul 27
0
dredge solely offset models in MuMIn
hello everyone, I'm modelling in lmer an average chick weight defined as "Total.brood.mass ~ offset(chick.number), with three fixed and two random effect. Next, I want to use function dredge from MuMIn package for model averaging. Not sure why, but in consequence the offset variable is treated as a predictor, so I get a table that mixes models with and without that offset term (the first
2004 Jul 15
2
formula and lm
Hi, don' t understand why the function fomula have this error, i enclose the parameter "a" with the function I() Thank Ruben x<-1:5 y<-c( 2 ,4 , 6 , 8 ,11) formu<-y~I(a*x) form<-formula(formu) dummy<-data.frame(x=x,y=y) fm<-lm(form,data=dummy) Error in unique(c("AsIs", oldClass(x))) : Object "a" not found
2010 Jul 17
0
package anacor possible for formula lm ?
Dear list I found package anacor very user-friendly but wanted to learn more after reading the publication "a simple..." and its manual. Please kindly help with the following questions and thanks in advance. 1. is it possible to implement lm formula in anacor? 2. is there manual to analyze the sample spider data using anacor ? Elaine [[alternative HTML version
2001 Oct 01
1
lm documentation, "formula" component (PR#1105)
Full_Name: David Firth Version: 1.3.1 OS: linux and others Submission from: (NULL) (163.1.103.121) help(lm) says that An object of class `"lm"' is a list containing at least the following components: ... formula: the formula supplied. But is the "formula" component necessarily present? An example: > x<-rnorm(10) > y<-rnorm(10) >
2020 Aug 10
0
lm() takes weights from formula environment
On 10/08/2020 1:42 p.m., John Mount wrote: > I wish I had started with "I am disappointed that lm() doesn't continue its search for weights into the calling environment" or "the fact that lm() looks only in the formula environment and data frame for weights doesn't seem consistent with how other values are treated." Normally searching is done automatically by
2006 Apr 17
1
interaction terms in formula of lm or glm
I would like to include pairwise interaction terms for lm(). For example, I want to include the quadratic term of variable "V3". > my.formula y ~ 1 + V1 + V3 + V3:V3 > my.data y V1 V2 V3 1 31 1 42 140 2 32 0 43 120 3 33 0 57 150 4 34 0 55 132 > foo <- lm(my.formula, data = my.data) > foo$coefficients (Intercept) V1 V3 29.47368421 -2.15789474
2020 Aug 09
0
lm() takes weights from formula environment
This is fairly clearly documented in ?lm: "All of weights, subset and offset are evaluated in the same way as variables in formula, that is first in data and then in the environment of formula." There are lots of possible places to look for weights, but this seems to me like a pretty sensible search order. In most cases the environment of the formula will have a parent environment
2007 Sep 12
0
constructing an lm() formula in a function
I'm working on some functions for generalized canonical discriminant analysis in conjunction with the heplots package. I've written a candisc.mlm function that takes an mlm object and computes a candisc object containing canonical scores, coeficients, etc. But I'm stumped on how to construct a mlm for the canonical scores, in a function using the *same* right-hand-side of the model
2013 Mar 06
2
lm and Formula tutorial
Dear all, I was reading last night the lm and the Formula manual page, and 'I have to admit that I had tough time to understand their syntax. Is there a simpler guide for the dummies like me to start with? I would like to thank you in advance for your help Regards Alex [[alternative HTML version deleted]]
2018 Jan 30
0
variable names in lm formula ~.
Functions are first class objects, so some kind of collision is bound to happen if you do this... so don't. -- Sent from my phone. Please excuse my brevity. On January 30, 2018 3:11:56 AM PST, "Vito M. R. Muggeo" <vito.muggeo at unipa.it> wrote: >dear all, >Is the following intentional? Am I missing anything in documentation? >
2004 Jul 22
1
Bug: wrong R-squared in lm formula w/o intercept (PR#7127)
Full_Name: Adriano Azevedo Filho Version: 1.9.1 OS: Windows, Linux Submission from: (NULL) (200.171.246.212) R-squared and Adjusted R-squared appear to be wrong when the formula in lm() is specified without intercept. Problem present in both Windows and Linux 1.9.1 version. Also in the 1.8.1 version for Windows (other versions not checked). Possible example which reproduces the problem:
2020 Aug 09
0
lm() takes weights from formula environment
On 09/08/2020 3:01 p.m., John Mount wrote: > Doesn't this preclude "y ~ ." style notations? Yes, but you can use "y ~ . - w". Duncan Murdoch > >> On Aug 9, 2020, at 11:56 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: >> >> This is fairly clearly documented in ?lm: >> >> "All of weights, subset and offset are
2008 Aug 24
1
Extracting formula from an lm object
I want to extra the part of the formula not including the response variable from an lm object. For example if the lm object ABx.lm was created by the call ABx.lm <- lm( y ~ A + B + x, ...) Then ACx.lm is saved as part of a workspace. I wish to extract "~ A + B + x". Later in my code I will fit another linear model of the form z ~ A + B + x for some other response variable z. I
2011 Nov 24
2
proper work-flow with 'formula' objects and lm()
Dear all I have a work-flow issue with lm(). When I use > lm(y1~x1, anscombe) Call: lm(formula = y1 ~ x1, data = anscombe) Coefficients: (Intercept) x1 3.0001 0.5001 I get as expected the formula, "y1 ~ x1", in the print()ed results or summary(). However, if I pass through a formula object > (form <- formula(y1~x1)) y1 ~ x1 > lm(form, anscombe) Call: