similar to: Slight discrepancy between predict.lm() and all.effects()

Displaying 20 results from an estimated 2000 matches similar to: "Slight discrepancy between predict.lm() and all.effects()"

2006 Nov 27
1
Help with response CIs for lme
Hi, Can someone please offer a procedure for going from CIs produced by intervals.lme() to fixed-effects response CIs. Here's a simple example: library(mlmRev) library(nlme) hsb.lme <- lme(mAch ~ minrty * sector, random = ~ 1 | cses, Hsb82) (intervals(hsb.lme)) (hsb.new <- data.frame minrty = rep(c('No', 'Yes'), 2), sector = rep(c('Public',
2006 Oct 06
1
glm and plot.effects
Dear R-helpers, I don't see a difference between the following two plots of effect objects, which I understand should be different. What am I missing? require(doBy) require(effects) data(budworm) m1 <- glm(ndead/20 ~ sex + log(dose), data=budworm, weight=ntotal, family=binomial) m1.eff <- all.effects(m1) plot(m1.eff, rescale.axis = FALSE, selection = 2, main = 'rescale =
2003 Jun 23
2
read.spss
I have loaded the foreign package and am still having problems with an import. I get a message that reads, unable to open file. Whe I try different files I get the same message. Here is the code I used. Am I missing something? I am using 1.7 and have also tried this in 1.6 with the same problem. hsb<-read.spss("C:\HLM504_Student\Examples\AppendxA\HSB1.SAV", use.value.labels=TRUE,
2007 Mar 07
1
Failure to run mcsamp() in package arm
Dear r-helpers, I can run the examples on the mcsamp help page. For example: **************************************** > M1 <- lmer (y1 ~ x + (1|group)) > (M1.sim <- mcsamp (M1)) fit using lmer, 3 chains, each with 1000 iterations (first 500 discarded) n.sims = 1500 iterations saved mean sd 2.5% 25% 50% 75% 97.5% Rhat n.eff beta.(Intercept)
2008 Oct 09
2
Two math expressions in plot
Hello! I am trying to put two math expressions in the title of a plot. As you can see below, I can place correctly one expression at a time, but not both. Ideally I would like to have them separated by a comma. Any suggestions? > k <- 1 > n.eff <- c(20, 30) > ### this works > plot(0,0, main = substitute(n == k, list(k = k))) > ### this works > plot(0,0, main =
2004 Apr 29
3
memory problems with lm
Hello list, I've seen the recent discussions documenting problems with lm. I have encountered the following problem. I use WinXP Pro with service pack 1, and R 1.9.0, on a XEON 2GHz, with 1GB of RAM. > eff.fro std.dev mean NSTRDSP 7.403749e-01 1.215686e-01 CPFGEP 9.056763e+00 1.815686e+00 WSWOLF 4.703588e+05 1.112832e+05 NPILGRIM 1.017640e+06 2.134335e+05
2000 Mar 14
1
qr.solve (fwd)
Two friend reported me a problem, which I can't solve: (I run R-1.0.0, Debian Linux) They hava a function "corr.matrix" (see end of mail), and when they create a 173x173 matrix with this function V <- corr.matrix(0.3, n=173) V1 <- qr.solve(V) reports: Error in qr(a, tol = tol) : NA/NaN/Inf in foreign function call (arg 1) For n < 173, qr.solve returns the correct
2003 Nov 30
1
bad performance on 2.4.23
hi, - big and ugly mail. If you don't like them, delete it now :-) - I have collected and classified some information of: http://home.earthlink.net/~rwhron/kernel/bigbox.html And I observed that ext3 performance is worse than previous kernels(2.4.19...). -ac and -aa are here only as reference. Complete information is in the upper URL. dbench: Performance is worse. dbench (Numbers are in
2006 Apr 06
1
polynomial predict with lme
Does lme prediction work correctly with poly() terms? In the following simulated example, the predictions are wildly off. Or am I doing something daft? Milk yield for five cows is measured weekly for 45 weeks. Yield is simulated as cubic function of weekno + random cow effect (on intercept) + residual error. I want to recover an estimate of the fixed curve. ############### library(nlme)
2010 Aug 26
1
Passing arguments between S4 methods fails within a function:bug? example with raster package.
Dear all, This problem came up initially while debugging a function, but it seems to be a more general problem of R. I hope I'm wrong, but I can't find another explanation. Let me illustrate with the raster package. For an object "RasterLayer" (which inherits from Raster), there is a method xyValues defined with the signature
2010 Nov 16
1
Offset in glm poisson using R vs Exposure in Stata
R-helpers, I am hoping to find someone who uses both R and program Stata for GLMs. I am a beginner R user, finding my own way through; learning code etc. at the same time as learning the statistics I need to complete my project. What I have is the code from Stata and am trying to reproduce the same analysis in R - my program of choice. . glm count md ms rf sg, family(poisson)
2012 Oct 16
2
Penalty function constrained optimization
Hi All, I am trying to use optim() to minimize a function with a penalty function term. This is a simple model bioeconomic model of a fishery. The penalty function constrains the amount of effort (f) at 9. This works fine. The code is: ********** nfleets<-2 M<-1 M<-array(M,dim=c(nfleets)) N<-1000 cost<-c(30,30) cost<-array(cost,dim=c(nfleets)) Price<-2
2004 Jul 15
3
slight simplification to firewall log_rule_limit code
I think you can change the existing firewall logging code for log_rule_limit (where you have one case for for LOGRULENUMBERS and another almost identical case without) down to this slightly shorter version with no duplication (excerpt): if [ -n "$LOGRULENUMBERS" ]; then eval rulenum=\$${chain}_logrules [ -z "$rulenum" ] && rulenum=1 fi case
2012 Nov 16
1
Code works, but not as function.
Hi, I have some values in a list format generated by the following: Path_Number <- 0010 ID.Path <- formatC(0001:Path_Number, width=4, flag=0) # Make vector of ID's. No_of_Effectors <- sample(1:550, length(ID.Path), replace=TRUE) # Define Number of Effectors each individual gets. Effectors <- split(sample(1:10000, sum(No_of_Effectors), replace=TRUE), rep(ID.Path, No_of_Effectors))
2011 Apr 22
3
Reading a TIFF file
Dear all, I have been trying to speed up a process we have been done in ArcGIS. We have to read a single layer TIFF (monochrome image) in . For this, I have used the "rtiff" package. After reading the TIFF file, I compared the raw values for each pixel that I have in ArcGIS to the ones obtained in R. In ArcGIS I have discrete values in the range 0..255, while in R I have continuous
2014 Apr 29
1
"CBAnn" channel not going away in Asterisk 12
After an upgrade to Asterisk 12, I'm "collecting" channels. When I enter and then exit a conference room, I see: -- <CBAnn/207-0000067f;1> Playing 'confbridge-leave.slin' (language 'en') -- Channel CBAnn/207-0000067f;2 joined 'softmix' base-bridge <5edb1920-3774-4ba3-8c4d-23e8fd04519c> -- Channel CBAnn/207-0000067f;2 left
1999 Nov 23
1
postscript colors
Is color specification like this available in R for setting postscript colors? > hue <- c(0, seq(from = 0, by = 1/(nclass), length = nclass)) > sat <- c(0, rep(1.0, nclass)) > bri <- c(0, rep(1.0, nclass)) > zcolors <- cbind(hue, sat, bri) > ps.options (setcolor=ps.setcolor.hsb,colors=zcolors)
2002 Feb 07
1
Help with replicating an old SPSS GLM analysis
Greetings. I'm trying to replicate an analysis I did a few years ago, then in SPSS, using the SPSS GLM command: GLM n_diffpt WITH age_i inc_i join_i work_i educ_i give_i cs_i eff_i age_a inc_a join_a work_a educ_a give_a cs_a eff_a /METHOD = SSTYPE(3) /INTERCEPT = INCLUDE /PRINT = PARAMETER ETASQ RSSCP GEF /CRITERIA = ALPHA(.05) /DESIGN = age_i*age_a inc_i*inc_a
2006 Jan 30
1
weights argument in the lmer function in lme4
I suspect the weights argument is not having any effect. Package: Matrix Version: 0.995-2 Date: 2006-01-19 Beginning with this: Browse[1]> resp.lmer <- lmer(SensSSC ~ Block + Season + (1 | Plot) + (1 | Ma) + (1 | Pa) + + (1 | MaPa), weights = SensSSC.N, data = xx) I group the output into a table with my ran.eff function and get this:
2007 Oct 10
1
Deleting for() loop in function
Dear UseRs, I wrote following function in order to solve Data Envelopment Analysis. Reason for posting is that the function is slow when nrow(dat) is large. I wonder if other functions could substitute the for() loop in the code, such as mapply(). Can anybody help to rewrite the dea() function as efficiently as possible? The code is as follows: