similar to: NA's when subset in a dataframe

Displaying 20 results from an estimated 500 matches similar to: "NA's when subset in a dataframe"

2010 Nov 10
1
standardized/studentized residuals with loess
Hi all, I'm trying to apply loess regression to my data and then use the fitted model to get the *standardized/studentized residuals. I understood that for linear regression (lm) there are functions to do that:* * * fit1 = lm(y~x) stdres.fit1 = rstandard(fit1) studres.fit1 = rstudent(fit1) I was wondering if there is an equally simple way to get the standardized/studentized residuals for a
2011 Aug 10
1
studentized and standarized residuals
Hi, I must be doing something silly here, because I can't get the studentised and standardised residuals from r output of a linear model to agree with what I think they should be from equation form. Thanks in advance, Jennifer x = seq(1,10) y = x + rnorm(10) mod = lm(y~x) rstandard(mod) residuals(mod)/(summary(mod)$sigma) rstudent(mod)
2016 Apr 29
2
lm() with spearman corr option ?
Hi, A following function was kindly provided by GGally?s maintainer, Barret Schloerke. function(data, mapping, ...) { p <- ggplot(data = data, mapping = mapping) + geom_point(color = I("blue")) + geom_smooth(method = "lm", color = I("black"), ...) + theme_blank() + theme(panel.border=element_rect(fill=NA, linetype =
2008 Aug 05
1
Extracting variable names of final model in stepAIC
Hello there. I uses the following codes for the purpose of variable selection. > lmModel <- lm(y~.,data.frame(y=y, x=x)) > step <- stepAIC(lmModel, direction="both") > step$anova Stepwise Model Path Analysis of Deviance Table Initial Model: y ~ x.Market.Price + x.Quantity + x.Country + x.Incoterm + x.Channel + x.PaymentTerm Final
2017 Apr 04
0
Some "lm" methods give wrong results when applied to "mlm" objects
I had a look at some influence measures, and it seems to me that currently several methods handle multiple lm (mlm) objects wrongly in R. In some cases there are separate "mlm" methods, but usually "mlm" objects are handled by the same methods as univariate "lm" methods, and in some cases this fails. There are two general patterns of problems in influence measures:
2009 Apr 06
6
Need help in calculating studentized residuals/leverage values of non-linear model [nls()]
Hi there, I hope I can get advice regarding the calculation of leverage values or studentized residual values of a non-linear regression model. It seems like rstudent() does not work on a nls object. Many thanks in advance! Best regards, Xingli
2013 May 01
1
Trouble with methods() after loading gdata package.
Greetings to r-help land. I've run into some program crashes and I've traced them back to methods() behavior after the package gdata is loaded. I provide now a minimal re-producible example. This seems bugish to me. How about you? dat <- data.frame(x = rnorm(100), y = rnorm(100)) lm1 <- lm(y ~ x, data = dat) methods(class = "lm") ## OK so far library(gdata)
2011 Feb 09
5
Removing Outliers Function
I am working on a function that will remove outliers for regression analysis. I am stating that a data point is an outlier if its studentized residual is above or below 3 and -3, respectively. The code below is what i have thus far for the function x = c(1:20) y = c(1,3,4,2,5,6,18,8,10,8,11,13,14,14,15,85,17,19,19,20) data1 = data.frame(x,y) rm.outliers =
2003 Feb 26
1
plot as .ps file: where are the axes and labels gone
Sorry, I am sure, this must be documented somewhere (but there are that many docs and tutorials to scan for topics..., actually a great thing... but if you are in a hurry..): I want to save a plot as .ps (or .eps): > postscript("plot1.eps", horizontal=FALSE, onefile=FALSE,height=8,width=8,pointsize=10) > plot(hpfit$fit,rstudent(hpfit),xlab="Fitted
2013 Mar 27
1
lmer, p-values and all that
Dear Help: I am trying to follow Professor Bates' recommendation, quoted by Professor Crawley in The R Book, p629, to determine whether I should model data using the 'plain old' lm function or the mixed model function lmer by using the syntax anova(lmModel,lmerModel). Apparently I've not understood the recommendation or the proper likelihood ratio test in question (or both) for I
2002 Dec 12
1
(fwd from phsan@cs.siu.edu) Compiling error
----- Forwarded message from Yihua Philip Sheng <phsan@cs.siu.edu> ----- From: "Yihua Philip Sheng" <phsan@cs.siu.edu> Subject: Compiling error Date: Thu, 12 Dec 2002 11:49:45 -0600 To: <samba-binaries-admin@lists.samba.org> X-Mailer: Microsoft Outlook, Build 10.0.4024 X-Bogosity: No, tests=bogofilter, spamicity=0.000000, version=0.9.1.2 When I tried to compile the
2008 Jul 21
3
Building Samba 3.2.0 on Solaris with Sun compiler
I was able to build Samba 3.0.x under Solaris 10 using the Sun Studio compiler (cc) and the Solaris ld (/usr/ccs/bin/ld) that it uses. Trying to build Samba 3.2.0, however, I immediately run into a problem where the build process assumes the linker understands "--version-script", which is specific to the GNU linker: Linking shared library bin/libtalloc.so /usr/ccs/bin/ld: illegal
2004 Jan 23
2
Samba compile error
Hi, I am compiling Samba-3.0.1 on a Solaris 9 machine. I have gcc-3.3.2. Running "make" fails. Thanks for your advice. PATH=/usr/bin:/usr/local/bin:/usr/ccs/bin # ./configure --with-included-popt --with-gnu-ld # make .... Linking bin/smbd /usr/ccs/bin/ld: illegal option -- E usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:CD:F:GI:L:M:N:P:Q:R:S:VY:?] file(s) ... collect2: ld returned 1
2004 Jan 20
2
rstandard.glm() in base/R/lm.influence.R
I contacted John Fox about this first, because parts of the file are attributed to him. He says that he didn't write rstandard.glm(), and suggests asking r-devel. As it stands, rstandard.glm() has summary(model)$dispersion outside the sqrt(), while in rstandard.lm(), the sd is already sqrt()ed. This seems to follow stdres() in VR/MASS/R/stdres.R. Of course for the c("poisson",
2011 Nov 16
2
outlier identify in qqplot
Dear Community, I want to identify outliers in my data. I don't know how to use identify command in the plots obtained. I've gone through help files and use mahalanobis example for my purpose: NormalMultivarianteComparefunc <- function(x) { Sx <- cov(x) D2 <- mahalanobis(x, colMeans(x), Sx) plot(density(D2, bw=.5), main="Squared Mahalanobis distances, n=nrow(x),
2009 Oct 10
2
easy way to find all extractor functions and the datatypes of what they return
Am I asking for too much: for any object that a stat proc returns ( y <- lm( y~x) , etc ) ) , is there a super convenient function like give_all_extractors( y ) that lists all extractor functions , the datatype returned , and a text descriptor field ("pairwisepval" "lsmean" etc) That would just be so convenient. What are my options for querying an object so that I can
2005 Dec 06
1
standardized residuals (rstandard & plot.lm) (PR#8367)
Full_Name: Heather Turner Version: 2.2.0 OS: Windows XP Submission from: (NULL) (137.205.240.44) Standardized residuals as calculated by rstandard.lm, rstandard.glm and plot.lm are Inf/NaN rather than zero when the un-standardized residuals are zero. This causes plot.lm to break when calculating 'ylim' for any of the plots of standardized residuals. Example:
2011 Mar 14
3
Standardized Pearson residuals
Is there any reason that rstandard.glm doesn't have a "pearson" option? And if not, can it be added? Background: I'm currently teaching an undergrad/grad-service course from Agresti's "Introduction to Categorical Data Analysis (2nd edn)" and deviance residuals are not used in the text. For now I'll just provide the students with a simple function to use, but I
2003 Jan 09
3
serious problem with W2K TS and 2.2.7 PDC
Hi, My setup: RedHat 7.3 PDC server with samba 2.2.7 rpm rebuilt with max connections patch and ldapsam and a few other minor changes, openldap 2.0.23-4. Windows 2000 Terminal Server with SP3, with various pre SP4 updates too. Various Win2K Pro, Win95 OSR2 clients. [homes] comment = Home writable = yes valid users = %S nt acl support = no oplocks = no path = /md3/profiles/%U
2005 Jul 28
1
conversion from SAS
Hi, I wonder if anybody could help me in converting this easy SAS program into R. (I'm still trying to do that!) PROC IMPORT OUT= WORK.CHLA_italian DATAFILE= "C:\Documents and Settings\carleal\My Documents\REBECCA\stat\sas\All&nutrients.xls" DBMS=EXCEL2000 REPLACE; GETNAMES=YES; RUN; data chla_italian; set chla_italian;