similar to: why does data frame subset return vector

Displaying 20 results from an estimated 800 matches similar to: "why does data frame subset return vector"

2007 Aug 23
0
weighted nls and confidence intervals
for unweighted fits using `nls' I compute confidence intervals for the fitted model function by using: #------------------- se.fit <- sqrt(apply(rr$m$gradient(), 1, function(x) sum(vcov(rr)*outer(x,x)))) luconf <- yfit + outer(se.fit, qnorm(c(probex, 1 - probex))) #------------------- where `rr' contains an `nls' object, `x' is the independent variable vector, `yfit'
2007 Aug 31
0
non-linear fitting (nls) and confidence limits
dear list members, I apologize in advance for posting a second time, but probably after one week chances are, the first try went down the sink.. my question concerns computation of confidence intervals in nonlinear fits with `nls' when weigthing the fit. the seemingly correct procedure does not work as expected, as is detailed in my original post below. any remarks appreciated. greetings
2009 Nov 29
1
optim or nlminb for minimization, which to believe?
I have constructed the function mml2 (below) based on the likelihood function described in the minimal latex I have pasted below for anyone who wants to look at it. This function finds parameter estimates for a basic Rasch (IRT) model. Using the function without the gradient, using either nlminb or optim returns the correct parameter estimates and, in the case of optim, the correct standard
2008 Aug 17
1
before-after control-impact analysis with R
Hello everybody, In am trying to analyse a BACI experiment and I really want to do it with R (which I find really exciting). So, before moving on I though it would be a good idea to repeat some known experiments which are quite similar to my own. I tried to reproduce 2 published examples but without much success. The first one in particular is a published dataset analysed with SAS by
2013 Feb 15
0
CVlim
Can anyone help explain to me why the two codes below have different result? I thought I can use log(time)~. to replace log(time)~dist+climb+timef.I am using CVlm from DAAG package. I think nihills is preloaded with the package. Thanks in advance. > CVlm(df=nihills, form.lm=formula(log(time)~.),plotit="Observed",m=2)Analysis of Variance Table Response: log(time) Df Sum Sq
2008 Jan 08
1
Problem in anova with coxph object
Dear R users, I noticed a problem in the anova command when applied on a single coxph object if there are missing observations in the data: This example code was run on R-2.6.1: > library(survival) > data(colon) > colondeath = colon[colon$etype==2, ] > m = coxph(Surv(time, status) ~ rx + sex + age + perfor, data=colondeath) > m Call: coxph(formula = Surv(time, status) ~ rx +
2011 Aug 25
3
Selections in lists
Hi, I have produced a list g and I would like to reduce the amount of information contained in each object in g. For each matrix I would like to keep the values where the column name equals g[year][[1]][[x]] and the row names equals g[year][[1]][[-x]]. So in g$`1999`$`8029`, year = 1999 and x = 8029. I have been experimenting with the subset function, but have been unsuccesful. Thanks for your
2011 Jul 13
1
AR-GARCH with additional variable - estimation problem
Dear list members, I am trying to estimate parameters of the AR(1)-GARCH(1,1) model. I have one additional dummy variable for the AR(1) part. First I wanted to do it using garchFit function (everything would be then estimated in one step) however in the fGarch library I didn't find a way to include an additional variable. That would be the formula but, as said, I think it is impossible to add
2011 Mar 03
0
'merge' function creating duplicate columns names in the output
The "merge" command is creating duplicate column names in a dataframe that is the result of the merge. The following is the 'merge' command: x <- merge(invType , allocSlots , by.x = 'index' , by.y = 'indx' , all.x = TRUE ) The 'invType' dataframe was the result of a previous merge and has the following column names that are
2008 Apr 22
3
[PATCH 0/3] ia64/pv_ops preparation
Hi. This patchset is preparation patches for ia64/pv_ops support. They are almost trivial and mainly make kernel paravirtualization friendly. thanks, Diffstat: arch/ia64/kernel/irq_ia64.c | 1 - include/asm-ia64/intrinsics.h | 11 +++++++++++ include/asm-ia64/mmu_context.h | 6 +----- include/asm-ia64/smp.h | 2 ++ include/asm-ia64/system.h | 10 ++++++++-- 5 files
2005 May 03
0
Survival
Dear list, I made survival analysis using Weibull regression. I got significance in the analysis: >anova(m1) Df Deviance Resid. Df -2*LL P(>|Chi|) NULL NA NA 2158 4933.109 NA tratt -8 577.0669 2150 4356.042 1.988317e-119 and > summary(m1) Call: survreg(formula = Surv(tempo, sensore) ~ tratt) Value Std. Error z p
2011 Mar 22
1
Rmark and scientific notation issue
Hi all, Just wondering if anyone might know a way to stop R reading my survival history that has zeros at the beginning in as scientific notation. The data is being read in from a .txt file via read.table to be used with Rmark I have the same issues at the moment with reading in .csv and .xls files. The number was formatted as text in the .xls file otherwise excel puts it into scientific notation
2004 Jul 13
2
confint.glm in a function
I can't get confint.glm to work from within a function. Consider the following (using R 1.9.1, Windows 2000): # FIRST: SOMETHING THAT WORKS FROM A COMMAND PROMPT DF <- data.frame(y=.1, N=100) (fit <- glm(y~1, family=binomial, data=DF, weights=DF[,"N"])) Call: glm(formula = y ~ 1, family = binomial, data = DF, weights = DF[, "N"]) Coefficients:
2006 Jul 15
0
How to Interpret Results of Regression in R
----------------------------------------------------------------------------------------------------- Howdy, Gurus I am appying R package for regression analysis as followings. A dependent variable is jhnet that means ratio of dividing internal trip with all trips in a traffic zone. There are many indepentent variables including factor or dummy varibles such as parkfee, ohouse, Devt2, corridor1.
2005 Jul 14
2
Coxph with factors
Hello, I am fitting a coxph model with factors. I am running into problems when using 'survfit'. I am unsure how R is treating the factors when I fit, say: > DATA<-data.frame(time.sec,done,f.pom=factor(f.pom),po,vo) > final<-coxph(Surv(time.sec,done)~f.pom*vo+po,data=DATA) > final.surv<-survfit((final), individual=T,conf.type="log-log")
2002 Dec 09
2
Problem with differences between S+ and R in parsing output tables with $
R-wizards I have successfully run with S+ a statistical power calculation for non-normal distributions as presented in M. Crawley?s new book.? When I tried the newest version of R on the same code, the $ parse statement doesn't seem to retrieve the appropriate number from a table. Note that some of the cosmetic differences in the two tables have to be dealt with by the parser. Any ideas
1999 Apr 29
1
R-0.64.0 installation on SGI IRIX 6.5 machine
Hi, I am trying to install R-0.64.0 version on SGI machine running IRIX 6.5. Machine details: 319 <mind.krasnow.gmu.edu:R-0.63.3> uname -a IRIX64 mind 6.5 07271714 IP27 Configure script runs fine and the output at the end of configure is: R is now configured for mips-sgi-irix6.5 Source directory: /usr/local/R-0.64.0 Installation directory: /usr/local C compiler:
1999 Feb 22
1
Size of objects in the workspace
Is there an easy way (or any way) to determine the size of all the objects in an R workspace. I know that "dim" will work on matrices, "length" will work on lists, but what gives the size of a function? After I have worked for a few days I often get confused about what is what in the workspace, so I'm looking for something like "ls -l", to point me toward
2017 Oct 11
1
[PATCH v1 01/27] x86/crypto: Adapt assembly for PIE support
Change the assembly code to use only relative references of symbols for the kernel to be PIE compatible. Position Independent Executable (PIE) support will allow to extended the KASLR randomization range below the -2G memory limit. Signed-off-by: Thomas Garnier <thgarnie at google.com> --- arch/x86/crypto/aes-x86_64-asm_64.S | 45 ++++++++----- arch/x86/crypto/aesni-intel_asm.S
2010 Apr 02
1
Extremely weired Thunderbird OpenSSH interaction
Dear OpenSSH developers, first thank you for this great tool! Me and a friend have experienced some seriously crazy interaction between Thunderbird and OpenSSH, the problem is it's not reproducable but as it left definite traces on the server and it could be a serious security problem I still want to report it. so the following happened: My friend is running Ubuntu 9.10 with the new