similar to: two methods for regression, two different results

Displaying 20 results from an estimated 1000 matches similar to: "two methods for regression, two different results"

2009 Jun 08
3
Plotting two regression lines on one graph
Hi! I have fitted two glms assuming a poisson distribution which are: fit1 <- glm(Aids ~ Year, data=aids, family=poisson()) fit2 <- glm(Aids ~ Year+I(Year^2), data=aids, family=poisson()) I am trying to work out how to represent the fitted regression curves of fit1 and fit2 on the one graph. I have tried: graphics.off() plot(Aids ~ Year, data = aids) line(glm(Aids ~ Year,
2011 Feb 09
3
xp to samba domain member
I have a Samba PDC setup on FreeBSD with a WinXP, Win7, 2003 server and Ubuntu Linux all joined. All works from each workstation except for my Windows XP unable to access the Linux member. It can access all other computers except that one while Win7 and 2003 server have no problems accessing this Samba Linux member. The Linux member is running Samba 3.4.7... > [global] > netbios name =
2014 Mar 03
1
reference classes, LAZY_DUPLICATE_OK, and external pointers
We (the lme4 authors) are having a problem with doing a proper deep copy of a reference class object in recent versions of R-devel with the LAZY_DUPLICATE_OK flag in src/main/bind.c enabled. Apologies in advance for any improper terminology. TL;DR Is there an elegant way to force non-lazy/deep copying in our case? Is anyone else using reference classes with a field that is an external pointer?
2009 Apr 03
1
Trouble extracting graphic results from a bootstrap
Hi, I'm trying to extract a histogram over the results from a bootstrap. However I keep receiving the error message "Error in hist.default(boot.lrtest$ll, breaks = "scott") : 'x' must be numeric". The bootstrap I'm running looks like: > boot.test <- function(data, indeces, maxit=20) { + y1 <- fit1+e1[indeces] + mod1 <- glm(y1 ~ X1-1, maxit=maxit) +
2002 Dec 18
6
Can I build an array of regrssion model?
Hi, I am trying to use piecewise linear regression to approximate a nonlinear function. Actually, I don't know how many linear functions I need, therefore, I want build an array of regression models to automate the approximation job. Could you please give me any clue? Attached is ongoing code: rawData = scan("c:/zyang/mass/data/A01/1.PRN", what=list(numeric(),numeric())); len =
2010 Sep 09
5
Highlighting a few bars in a barplot
Hello, I have a bar plot where I am already using colour to distinguish one set of samples from another. I would also like to highlight a few of these bars as ones that should be looked at in detail. I was thinking of using hatching, but I can't work out how or if you can have a background colour and hatching which is different between bars. Any suggestions on how I should do this? Thanks
2010 Nov 12
2
Strange bug since 3.83 version
Hello, i've found a strange bug, here is my situation: - all of our computers makes a pxeboot request by default dhcp server is configured: option option-128 code 128 = string; option option-129 code 129 = text; option space PXE; option PXE.mtftp-ip code 1 = ip-address; option PXE.mtftp-cport code 2 = unsigned integer 16; option PXE.mtftp-sport code 3 = unsigned
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
2020 Sep 29
5
2 KM curves on the same plot
Hello, Can anyone suggest a simple way to generate a Kaplan-Meier plot with 2 survfit objects, just like this one:? https://drive.google.com/file/d/1fEcpdIdE2xYtA6LBQN9ck3JkL6-goabX/view?usp=sharing Suppose I have 2 survfit objects: fit1 is for the curve on the left (survtime has been truncated to the cutoff line: year 5), fit2 is for the curve on the right (minimum survival time is at the
2009 Aug 14
1
aov p values for levels of a factor.
Windows XP R2.8.1 I am running an balanced aov, in which Time has 4 levels, Group has 2 levels: fit2<-aov(Post ~ as.factor(Time) +as.factor(Group)+as.factor(Group*Time)+Error(SS), alldata) I would like to get a p value for each level of time, each level of Group and each level of Group*Time. How can I do this? I get this, which appears to be omnibus p values for the factors: Error: SS
2017 Dec 20
1
Nonlinear regression
You also need to reply-all so the mailing list stays in the loop. -- Sent from my phone. Please excuse my brevity. On December 19, 2017 4:00:29 PM PST, Timothy Axberg <axbergtimothy at gmail.com> wrote: >Sorry about that. Here is the code typed directly on the email. > >qe = (Qmax * Kl * ce) / (1 + Kl * ce) > >##The data >ce <- c(15.17, 42.15, 69.12, 237.7, 419.77)
2011 May 01
1
Different results of coefficients by packages penalized and glmnet
Dear R users: Recently, I learn to use penalized logistic regression. Two packages (penalized and glmnet) have the function of lasso. So I write these code. However, I got different results of coef. Can someone kindly explain. # lasso using penalized library(penalized) pena.fit2<-penalized(HRLNM,penalized=~CN+NoSus,lambda1=1,model="logistic",standardize=TRUE) pena.fit2
2012 Nov 08
2
Comparing nonlinear, non-nested models
Dear R users, Could somebody please help me to find a way of comparing nonlinear, non-nested models in R, where the number of parameters is not necessarily different? Here is a sample (growth rates, y, as a function of internal substrate concentration, x): x <- c(0.52, 1.21, 1.45, 1.64, 1.89, 2.14, 2.47, 3.20, 4.47, 5.31, 6.48) y <- c(0.00, 0.35, 0.41, 0.49, 0.58, 0.61, 0.71, 0.83, 0.98,
2009 Feb 19
1
Read.table not reading in all columns
Hello, I am reading in a file called fit2.txt (Limma). fit2.txt has 38 columns but when I dim(fit2) I only get 6 columns. The first column that it does not read in is df.residual. fit2<-read.table(fit2, file="fit2.txt",sep="\t",quote="",comment.char="",as.is=TRUE) The first few lines of fit2.txt (does not include all 38 columns) looks like this:
2010 Apr 01
1
predicted time length differs from survfit.coxph:
Hello All, Does anyone know why length(fit1$time) < length(fit2$n) in survfit.coxph output? Why is the predicted time length is not the same as the number of samples (n)? I tried: example(survfit.coxph). Thanks, parmee > fit2$n [1] 241 > fit2$time [1] 0 31 32 60 61 152 153 174 273 277 362 365 499 517 518 547 [17] 566 638 700 760 791
2011 Jan 26
2
Extracting the terms from an rpart object
Hello all, I wish to extract the terms from an rpart object. Specifically, I would like to be able to know what is the response variable (so I could do some manipulation on it). But in general, such a method for rpart will also need to handle a "." case (see fit2) Here are two simple examples: fit1 <- rpart(Kyphosis ~ Age + Number + Start, data=kyphosis) fit1$call fit2 <-
2010 Mar 17
1
accessing info in object slots from listed objects using loops
Hey, I have stacked a couple of garchFit objects in a list with names $fit1, $fit2, ..., $fiti assigning objects names using a loop, i.e. after running the loop modelStack = list($fit1, $fit2,...,$fiti). Thus the following apply; a = modelStack$fit2, then a is the second garchFit object of formal class 'fGarch' with 11 slots, @call, @formula... etc. I then want to extract information in
2009 Jul 28
2
A hiccup when using anova on gam() fits.
I stumbled across a mild glitch when trying to compare the result of gam() fitting with the result of lm() fitting. The following code demonstrates the problem: library(gam) x <- rep(1:10,10) set.seed(42) y <- rnorm(100) fit1 <- lm(y~x) fit2 <- gam(y~lo(x)) fit3 <- lm(y~factor(x)) print(anova(fit1,fit2)) # No worries. print(anova(fit1,fit3)) # Likewise. print(anova(fit2,fit3)) #
2009 May 04
1
Nelson-Aalen estimator of cumulative hazard
Hi, I am computing the Nelson-Aalen (NA) estimate of baseline cumulative hazard in two different ways using the "survival" package. I am expecting that they should be identical. However, they are not. Their difference is a monotonically increasing with time. This difference is probably not large to make any impact in the application, but is annoyingly non-trivial for me to just
2011 Mar 25
2
A question on glmnet analysis
Hi, I am trying to do logistic regression for data of 104 patients, which have one outcome (yes or no) and 15 variables (9 categorical factors [yes or no] and 6 continuous variables). Number of yes outcome is 25. Twenty-five events and 15 variables mean events per variable is much less than 10. Therefore, I tried to analyze the data with penalized regression method. I would like please some of the