Displaying 20 results from an estimated 4000 matches similar to: "replacing missing values in a dataframe with reference values."
2005 Jul 25
5
passing formula arguments cv.glm
I am trying to write a wrapper for the last example in help(cv.glm) that
deals with leave-one-out-cross-validation (LOOCV) for a logistic model.
This wrapper will be used as part of a bigger program.
Here is my wrapper funtion :
logistic.LOOCV.err <- function( formu=NULL, data=NULL ){
cost.fn <- function(cl, pred) mean( abs(cl-pred) > 0.5 )
glmfit <- glm(
2005 Nov 06
3
How can I assign an argument to transfer whether by ref or by value?
Hello guys,
I am wondering the default way of transferring arguments in R. Is it by
value or by ref in default case, or could that be changed explicitly?
Cheers,
Xiaofan
---
Xiaofan Li
Department of Applied Mathematics and Theoretical Physics
University of Cambridge
2005 Nov 06
2
OLS variables
Dear all,
Is there any simple way in R that can I put the all the interactions of the variables in the OLS model?
e.g.
I have a bunch of variables, x1,x2,.... x20... I expect then to have interaction (e.g. x1*x2, x3*x4*x5... ) with some combinations(2 way or higher dimensions).
Is there any way that I can write the model simpler?
Thanks!
Leaf
2014 Jul 08
1
[PATCH] nv50/ir: use unordered_set instead of list to keep our instructions in uses
This shortens runtime of piglit test fp-long-alu to ~22s
No piglit regressions observed on nvc0!
Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
---
src/gallium/drivers/nouveau/codegen/nv50_ir.cpp | 6 +++---
src/gallium/drivers/nouveau/codegen/nv50_ir.h | 7 ++++---
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 2 +-
2012 Jan 19
2
Reading in tab (and space) delimited data within a script XXXX
Hello everyone,
I use Bob Muenchen's approach for reading in "in-stream" (to use SAS
parlance) delimited data within a script. This works great:
mystring <-
"id,workshop,gender,q1,q2,q3,q4
1,1,f,1,1,5,1
2,2,f,2,1,4,1
3,1,f,2,2,4,3
4,2, ,3,1, ,3
5,1,m,4,5,2,4
6,2,m,5,4,5,5
7,1,m,5,3,4,4
8,2,m,4,5,5,5"
mydata <- read.table( textConnection(mystring),
2013 Mar 23
1
Non-convergence error for GLMM with LME4?
Hello! I am trying to run a GLMM using LME4, and keep getting the warning message: "In mer_finalize(ans) : false convergence (8)" I am quite new to R, and in looking into this thus far, it appears that there are a variety of reasons why this might occur, such as needing to standardize some parameters or if all subjects in one combination of parameters all have the same outcome. I also
2008 Oct 28
1
lattice: overlap histogram
Dear R users,
Is it possible to have an overlap histogram plot? For example:
stuff <- data.frame(Mode = c("Land", "Air"), AgeGroup = c("Young", "Adult",
"Old"), Value = sample(1:300))
histogram( ~Value | AgeGroup * Mode, data = stuff, auto.key = TRUE)
Instead of having 2 * 3 panel, I want to have just 3 panel, overlapping the
"Mode"
2004 Jan 30
1
Trouble plotting with factor
With R 1.8.1 running in Fedora Core 1 Linux, I am having some trouble
recoding and ploting some factor variables.
First, can I give you some example data?
Here is a column of names for age groups:
agegroups <- c( "15-19", "20-24", "25-29","30-34", "35-39",
2007 Apr 09
1
Repeated Measures design using lme
Hi,
I have what I believe is a repeated-measures dataset that I'm trying to analyze using lme(). This is *not* homework, but an exercise in my trying to self-teach myself repeated-measure ANOVA for other *real* datasets that I have and that are extremely similar to the following design.
I'm fairly sure the dataset described below would work with lme() -- but it'd be great if anybody
2007 Oct 05
0
discrepancy in the result of R and SAS on same data in logistics regression
Dear Members,
Greetings!
I have come across a discrepancy shown by R and SAS results on same data for logistics regression..
When I processed the above csv file(1000.csv) for predicting the Action (i/c) by Age Group(1-7,Na) and Gender(M,F,Na) with GLM of R I get:
R result
Call:
glm(formula = Action ~ Gender + AgeGroup, family = binomial,
data = mydata1, na.action = na.pass)
Deviance
2008 Jul 28
1
Negative Binomial Regression
Hello.
I am attempting to duplicate a negative binomial regression in R. SAS uses
generalized estimating equations for model fitting in the GENMOD procedure.
proc genmod data=mydata (where=(gender='F'));
by agegroup;
class id gender type;
model count = var1 var2 var3 /dist=NB link=log offset=lregtm;
repeated subject=id /type=exch;
run;
Since my dataset has several observations for
2008 Apr 27
1
Adding rownames with different lengths to a table
Hello! I would like to add names to a table. The table presents median values, numbers of values (n) and percentage(%) for a given agegroup. Thus I would like to add a label above these three variables for each category. But if I try to use colnames I get a message telling me that the number of labels must be equal to the number of columns in the table. I hope someone could understand what I mean!
2009 Dec 22
0
Reshpaing for xyplot() or ggplot()
Dear list,
I have 2 data sets such as:
> head(calib20090730b)
color XR XG XB L1_1 L1_2 L1_3
1 1 87 55 62 116 124.0 100
2 2 164 125 134 204 203.0 153
3 3 118 64 98 157 101.0 139
4 4 65 72 72 102 111.0 135
5 5 142 95 112 176 161.5 133
6 6 89 113 112 125 128.0 195
> head(refpanel)
color B G R NIR1 NIR2
1 1 0.07 0.10 0.17
2016 Dec 02
2
4.9-rc7 nouveau fails on arm64 64k page kernel but works with 4k
That's right -- nouveau currently requires 4k page sizes to work. This is a
software limitation, not a hardware one though.
On Dec 1, 2016 5:13 PM, "Jeremy Linton" <jeremy.linton at arm.com> wrote:
Hi,
I placed a 9600GT in a softiron 3k running fedora 25, and the nouveau
driver failed to claim the device with :
[drm] Initialized
nouveau 0000:01:00.0: NVIDIA G94 (094100a1)
2016 Dec 07
0
4.9-rc7 nouveau fails on arm64 64k page kernel but works with 4k
On Fri, Dec 2, 2016 at 12:23 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> That's right -- nouveau currently requires 4k page sizes to work. This is a
> software limitation, not a hardware one though.
Looking at the trace I wonder - is the limitation in Nouveau or in TTM?
>
>
> On Dec 1, 2016 5:13 PM, "Jeremy Linton" <jeremy.linton at arm.com> wrote:
2007 Jul 20
1
GEE code
I'm writing a paper aimed at motivating the use of GEE within the field of
economics. However, after computing using the geeglm function, I noticed
there's one intercept in the summary output. I assume this means the
function is pooling the data. That means my code is not what I want. I
want a "fixed effects" model, meaning I want the intercept to vary by
cluster. Here's
2010 Nov 20
0
Fwd: Festival of Pacific Arts web cast
---------- Forwarded message ----------
From: Sean Linton <sean at lpnz.org>
Date: 20 November 2010 18:33
Subject: Festival of Pacific Arts web cast
To: Robert Loomans <robertl at apnic.net>, George Michaelson <ggm at apnic.net>,
sylvia at apnic.net, Gaurab Raj Upadhaya <gaurab at lahai.com>, Ian Pringle <
ipringle at col.org>, Martin Hadlow <m.hadlow at
2006 Mar 14
1
setMethod confusion
Hello I've checked through previous postings but don't see a fully
equivalent problem-just a few hints.
I have been trying to set a new method for the existing function "table"
or "as.data.frame.table" for my class "tfSites".
Taking out all the useful code and just returning the input class I get
the error
setMethod("table",
2009 Apr 12
0
acm_init: Loading default policy but not policy is installed.
Hi all,
I''ve successfully installed xen3.3.0 on Linux ubuntu 2.6.27.5 #1 SMP i686 GNU/Linux. I
built xen with the requisite XSM_ENABLE=y, ACM_SECURITY=y and believe I have the correct
config parameters in the 2.6.27.5 kernel.
Boot goes smoothly, set to automatically create 2 domUs. All appears okay with XSM/ACM...
root@ubuntu:~# xm dmesg | grep -i xsm
(XEN) XSM Framework v1.0.0
2008 Apr 07
2
Naming rows oe columns in a data frame.
Hello there! I have a really basic question. I have extracted some data from a big database. I have ordered the data in to different agegroups in the rows. Now I want to to have labels of the columns which is going to be divided into men , women and totals. How do I give names to a column? My data looks like this for the moment;
0-39 12 34 43
40-49 14 23 23
50-59 16