search for: setx

Displaying 20 results from an estimated 23 matches for "setx".

Did you mean: set
2009 Feb 19
0
Zelig method setx()
Hello, I am attempting to "automate" a Bayesian normal linear regression using Zelig. Basically, I have a list containing several zelig() objects, each having a different formula, same data set, and same model (normal.bayes). My problem lies in the setx() method, where I am setting a numeric parameter to a value other than the mean. This is straightforward if I input the parameters name into setx(). i.e., setx.out<-setx(zelig.model, parameter1=20) where parameter1 is the name of the given parameter. To automate this process, via a for loop...
2007 May 25
1
Question about setReplaceMethod
...finition (declared by setMethod) of the same class. I do not understand this behavior that much. I'm wondering how to make this work? Any help would be really appreciated. Thank you. setClass("foo", representation(x="data.frame", y="character")) setGeneric("setX<-", function(this, value), standardGeneric("setX<-")) setReplaceMethod("setX", "foo", function(this,value) { this@x <- value }) setGeneric("generateFrame", function(this), standardGeneric("generateFrame")) setReplaceMethod("genera...
2009 Oct 27
1
How to reduce key strokes when defining S4 classes?
...quot;) .Object<-callNextMethod(.Object,x=x) return(.Object) } ) setGeneric('getx', function(object){ standardGeneric('getx') } ) setMethod('getx', 'A', function(object){ return(object at x) } ) setGeneric('setx<-', function(.object,value){ standardGeneric('setx<-') } ) setReplaceMethod(f='setx', signature='A', def=function(.object,value){ .object at x<-value return(.object) } ) a=new(Class='A',x=10) print(getx(a)) setx(a...
2005 Jan 06
0
package Zelig problem with setx
Hi! Does somebody out there has experience with the Zelig package from Harvard uni? I have a problem when trying to set the explanatory variables with setx Polytomous logistic regression: >z.out <- zelig(OPARS ~ v1+v2+v3+...+vn, model = "mlogit", data=heb) that's OK >x.out<-set(z.out) Error in seq.Date(along = object) : `from' must be specified #??? I have no date objects present in the model??? Thanks Anne ---...
2011 Dec 16
0
Incorrect Number of Dimensions in Zelig with setx()
I'm running an ordered logit in R with the Zelig package and am trying to calculate some predicted probabilities. However, I get the following error message. > x.low <- setx(mod, cars=1)Error in dta[complete.cases(mf), names(dta) %in% vars, drop = FALSE] : incorrect number of dimensions I googled this problem and couldn't find anything, minus a question by me on this same problem from 1.5 years ago. Just don't remember what I did to solve the problem. H...
2009 Dec 30
1
Fwd: Negbin Error Warnings
...---- From: Clara Brück <clara_brueck@web.de> Date: 2009/12/30 Subject: Re: [R] Negbin Error Warnings To: milton ruser <milton.ruser@gmail.com> Dear Milton, Thanks for your email. I ran the NBR-model and then tried to compute the first differences of some expected values: m3.x1 <-setx(m3, advisory=1) m3.x2 <-setx(m3, advisory=0) m3.s1 <-sim (m3,x=m3.x1, x1=m3.x2) However, I then get 50 error warnings, and there all like this: In rpois(k, (mu * rgamma(k, theta))/theta) : NAs produced Bests Clara > -----Ursprüngliche Nachricht----- > Von: "milton ruser" &...
2009 Mar 31
4
what is the preferred method to create a package local variable?
for the moment, I'm using: .onAttach <- function(libname, pkgname) { .bbg.db.conn <<- dbConnect(dbDriver("PostgreSQL"), user="blah","blah") } .onUnload <- function(libpath) { dbDisconnect(.bbg.db.conn) } which results in a hidden global variable in the global environment. I would prefer to make the assignment only in the package namespace.
2011 Apr 26
2
Wish R Core had a standard format (or generic function) for "newdata" objects
...;options" there. If I don't use that for a month or two, I completely forget the fine points and have to fight with it. But it does "work" to give plots and predict functions the information they require. In Zelig ( by Kosuke Imai, Gary King, and Olivia Lau), a function "setx" does the work of creating "newdata" objects. That appears to be about right as a candidate for a generic "newdata" function. Perhaps it could directly generalize to all R regression functions, but right now it is tailored to the models in Zelig. It has separate methods for...
2011 Jan 25
0
Problem with matchit() and zelig()
...hit(treat~age+educ+black+hispan+nodegree+married +re74+re75, method="full", data=lalonde) > >z.out1<-zelig(re78~age+educ+black+hispan+nodegree+married+re74+re75, data=match.data(m.out1, "control"), model="ls" , weights="weights" ) > >x.out1<-setx(z.out1, data=match.data(m.out1, "treat"), cond=T ) > >s.out1<-sim(z.out1, x=x.out1) > Error in model.frame.default(formula = re78 ~ age + educ + black + hispan + : variable lengths differ (found for '(weights)') I noticed that the problem disappears if either the...
2009 Dec 30
2
Negbin Error Warnings
Hi, I ran a negative binomial regression (NBR) using the Zelig-package and the negbin model. When I then try to use the simumlation approach using the setx () and sim() functions to calculate expected values and first difference for different levels of one of my independent variables, I get 50 errors warnings, telling me that the calculation rpois produced NAs. However, the data I use doesn't have any NAs. Does this mean that the NBR-model is the...
2007 May 30
3
http proxies: setting and unsetting
Hi, I am trying to use R at work and at home on the same computer. At work, I have a proxy, and at home, I do not. I have, for work, a User environment variable "http_proxy" which I set in the OS (Windows XP Pro). When I am at work, and I try to retrieve data from the web with 'read.csv', things work just fine. I assume it knows how to use the proxy. The trouble is when I
2011 Dec 16
1
Zellig Error Message
I'm trying to calculate predicted probabilities in R with Zelig and keep getting the following error. Can anyone help? > x.low <- setx(mod, type=1)Error in dta[complete.cases(mf), names(dta) %in% vars, drop = FALSE] : incorrect number of dimensions When I ran the model, I ran everything but the explanatory variable as a numeric variable. Now, I'm trying everything and no luck. -- *Abraham Mathew Statistical Analyst www...
2003 Mar 04
5
XP "logon failure" but still logs on -- no roaming profile
I'm having a problem with roaming domains on Samba v3.0-alpha21. I've connected the machine (watertown) to the domain (precidia) via the server (griffon). I've logged on with my userid (bcwhite) and seen my roaming profile get created on the server upon logoff. Future logons grab the roaming profile and everything is fine. However, _sometimes_ I get a window with the message:
2006 Apr 04
0
simulation with Zelig
..., weights = my.weights) Since the regression is weighted before running the regression I used the procedure: zelig2ls <- function(formula, model, data, M, ...) { mf <- match.call(expand.dots = TRUE) mf[[1]] <- as.name("ls") as.call(mf) } but when I set x.out<-setx(z.out) I receive the following error message: Error in model.frame(formula, rownames, variables, varnames, extras, extranames, : variable lengths differ In addition: Warning message: There is more than one mode. The first level is selected. in: FUN(X[[1]], ...) Any suggestion is appre...
2011 Jul 06
0
matching, treatment effect-ATT and Zelig package
...g) data(lalonde) re78 represents the outcome variable 1. With Zelig m.out <- matchit(treat ~ age + educ + black + hispan + married + nodegree + re74 + re75, data = lalonde) z.out <- zelig(re78 ~ distance, data = match.data(m.out, "control"), model = "ls") x.out <- setx(z.out, fn = NULL, data = match.data(m.out, "treat"), cond = TRUE) s.out <- sim(z.out, x = x.out) summary(s.out) 2. Without Zelig - only matching T.output <- match.data(m.out, group="treat")$re78 C.output <- match.data(m.out, group="control")$re78 ATT <- m...
2011 Dec 16
0
Error constructing probabilities in Zelig
...ities for a ordered logit in R. library(Zelig) mod <- zelig(sold ~ age + gender + marital + educ2 + cars + license + credit + type + home + id, model="ologit", data=dat, Hess=TRUE) summary(mod) For what it's worth, here's the error from my Zelig code. > x.out <- setx(mod, credit=1) Error in dta[complete.cases(mf), names(dta) %in% vars, drop = FALSE] : incorrect number of dimensions Can anyone tell me what I might be doing wrong. If not, can you give me an alternative solution that I can use to generate the probabilities. -- *Abraham Mathew Statistical Ana...
1999 Nov 08
1
user PATH variable
Hello, I'm nearly finished with the process of upgrading a client's old Novell server to a Linux box with Samba. The only problem I've run into is setting the user's PATH environment variable. When I use "PATH=%PATH%;h:\util" in a netlogon script, PATH is not inherited by the other programs. Could someone please explain how to do this on a global basis? Thanks,
1999 Nov 09
0
SAMBA digest 2300
...he user's PATH environment variable. When I use >>"PATH=%PATH%;h:\util" in a netlogon script, PATH is not inherited by the >>other programs. Could someone please explain how to do this on a global >>basis? > >There is a utility in the Windows NT Resource Kit, setx.exe, which can set >system and user environment variables. > There is also PATHMAN and KiXstart in the resource kit that allow you to do this.... Any where but in the NETLOGON script! Windows explorer during initialization ignores the message from these programs that it should update it...
2011 Dec 22
0
Finding predicted probabilities
..., mbid=c(mbid)) str(d1) m1 = zelig(mwin ~ mbid, data=d1, model="logit") summary(m1) plot(mwin ~ mbid) > str(d1)'data.frame': 66514 obs. of 2 variables: $ mwin: int 2 2 2 2 2 2 2 2 2 2 ... $ mbid: int 700 300 700 300 500 300 300 700 300 300 ... library(Zelig) x.out <- setx(m1, mbid=300) s.out <- sim(m1, x = x.out) summary(s.out) plot(s.out) When I run with mbid as 300, I get 49%. At 500, it's 49% and at 700 it's 50%. At 1500, it's 51% These results are just really weird. I was expecting an exponential curve when I plotted mbid by probability...
2009 Feb 25
1
[PATCH] CompRect more intuitive
...ompiz++ uses CompRegion instead of XRectangle, right? This patch tries to improve CompRect usability *First* I was using CompRect, but I've found that the only way to modify a CompRect is using setGeometry function: void CompOutput::setGeometry (int x1, int x2, int y1, int y2); So I created setX1, setY1, setX2, setY2 functions *Second* As you can see above, setGeometry uses: (x1,x2,y1,y2). I'm proposing to change to setGeometry (x1,y1,x2,y2) A Rectangle is defined by two points (x1,y1) and (x2,y2). So, setGeometry will be more intuitive if we use this order. This patch change all c...