Displaying 20 results from an estimated 10000 matches similar to: "Package manual examples - 'unexpected$undefined' errors"
2009 Oct 30
1
Package zelig
hello all
I am using the R package Zelig for some tobit regression with robust
standard errors.
I have got R version 2.9.2 (2009-08-24)
and Zelig Version: 3.4-5
when i do demo(robust)
It ends like this way
data(coalition)
> # Fit the model with robust standard error
> user.prompt()
Press <return> to continue:
> z.out3 <- zelig(Surv(duration, ciep12) ~ polar + numst2 +
2012 Apr 07
4
Display instruction text on package load
I'm currently working on a new package for R that interfaces with an API.
Most of the package's functionality requires users to supply an access key
that allows the package to work with the API. I want to display text
immediately upon loading the package that instructs/reminds users to enter
their access key before attempting to do anything (as the package won't
really work without
2009 Mar 15
3
read.xls question
I'm an R newbie and had a question about the read.xls function. I've heard that this is often not a reliable function to use for importing data. However, I have created numerous xls files which contain information about voter turnout and macroeconomic indicators in India. I'm writing a paper on the relationship between economic growth and voter turnout.
This is the command I use:
2007 Oct 19
1
plot.Design
Dear R-users:
I am trying to use the following code to reproduce the figures on page 140
of Prof. Frank Harrell's book 'Regression Modeling Strategies':
rm(list=ls())
options(width=128)
library(Hmisc)
library(Design)
getHdata(counties)
counties$older <- counties$age6574 + counties$age75
label(counties$older) <- '% age >= 65, 1990'
counties$pdensity <-
2013 Mar 05
2
Zelig package: Coxph model problems
Hi,
I'm having problems with the Zelig package - when using
the below R displays the follwing message (I'm running R
i386 2.15.3 for Windows and have updated all the Zelig
packages):
z.out<-zelig(Surv(psurv2, pcens2) ~ ren_sup3 + age,
data=data_urgent, model="coxph")
** The model "coxph" is not available with the currently
loaded packages,
** and is not an
2004 Jun 25
2
R 1.9.1 package installation problems
Hello,
I am writing as an administrator, not as an R user, so forgive me if I
am not completely knowledgeable about R.
I have a user who is creating an R package for windows from a Linux
environment using the crossbuild environment by Jun Yan and A.J.
Rossini. The packages she generated worked fine until she tried to
install in R 1.9.1 for Windows. Now when she installs with
2010 Feb 15
1
argh .. if/else .. why?
Hello, would someone please help explain the following inconsistency
in the if/else statement to me?
The format of the if/else #3 below is ok, but if/else #1 is not? (I get
an "unexpected else" type error.) In order for it to work I have to use
if/else #2
Thanks .. maybe there is some reason for this, but this looks very
inconsistent to me.
R version 2.10.1 (2009-12-14)
Ubuntu 9.04
2007 Nov 01
1
Zelig and the "blogit" model
Hi Folks,
According to the PDF file blogit.pdf in the Zelig
documentation:
"Use the bivariate logistic regression model ["blogit"]
if you have two binary dependent variables (Y1,Y2), and
and wish to model them jointly as a function of some
explanatory variables. Each pair of dependent variables
(Yi1,Yi2) has four potential outcomes, (Yi1=1,Yi2=1),
(Yi1=1,Yi2=0),
2010 May 11
1
(svy)glm and weights question
Hi all,
I am running a set of logistic regressions, where we want to use some
weights, and I am not sure whether what I am doing is reasonable or
not.
The dependent variable is turnout in an election - i.e. survey
respondents were asked whether or not they voted. The percentage of
those who say they voted is much higher than the actual turnout,
probably due both to non-response bias and social
2009 Apr 13
2
joint estimation of two poisson equations
Dear list members,
Is there a package somewhere for jointly estimating two poisson processes?
I think the closest I've come is using the "SUR" option in the Zelig
package (see below), but when I try the "poisson" option instead of
the "SUR" optioin I get an error (error given below, and indeed,
reading the documentation of the Zelig package, I get the impression
2011 May 17
2
can not use plot.Predict {rms} reproduce figure 7.8 from Regression Modeling Strategies (http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/course2.pdf)
Dear R-users,
I am using R 2.13.0 and rms 3.3-0 , but can not reproduce figure 7.8 of the
handouts *Regression Modeling Strategies* (
http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/course2.pdf) by the
following code. Could any one help me figure out how to solve this?
setwd('C:/Rharrell')
require(rms)
load('data/counties.sav')
older <- counties$age6574 + counties$age75
2010 Mar 29
1
Question about 'logit' and 'mlogit' in Zelig
I'm running a multinomial logit in R using the Zelig packages. According to str(trade962a), my dependent variable is a factor with three levels. When I run the multinomial logit I get an error message. However, when I run 'model=logit' it works fine. any ideas on whats wrong?
## MULTINOMIAL LOGIT
anes96two <- zelig(trade962a ~ age962 + education962 + personal962 + economy962 +
2007 May 26
1
How to get the "Naive SE" of coefficients from the zelig output
Dear R-user:
After the fitting the Tobit model using zelig, if I use the following command then I can get the regression coefficents:
beta=coefficients(il6.out)
> beta
(Intercept) apache
4.7826 0.9655
How may I extract the "Naive SE" from the following output please?
> summary(il6w.out)
Call:
zelig(formula = il6.data$il6 ~ il6.data$apache, model =
2008 Apr 11
1
Multinomial Logit Regression
Hi all,
I have a dataset with a response variable with three categories (1, 2, 3)
and a lot of continuous variables. I'd like to make a MLR with these
variables. I've been watching the libraries nnet and zelig for this purpose
but I don't understand them well.
I use a training sample data to make the MLR.
train.set <- sample(1:1000,1000*0.7)
I have done this:
library(nnet)
net
2009 Oct 13
1
How to specify an ARMA(1, [1,4]) model?
Hi,
I'm trying to model an ARMA(1,[1,4]),
i.e. I want only lags 1 and 4 of the Moving Average part.
It's the '[1,4]' part that is giving me a problem.
I've tried different arma's and arima's in different packages, namely:
packages tseries, fArma, FinTS, timeSeries, TSA, Zelig, ds1, forecast
For example, with package FinTS:
> ( ARIMA(y, order=c(1,0,c(1,4))) )
2011 Apr 26
2
Wish R Core had a standard format (or generic function) for "newdata" objects
Is anybody working on a way to standardize the creation of "newdata"
objects for predict methods?
When using predict, I find it difficult/tedious to create newdata data
frames when there are many variables. It is necessary to set all
variables at the mean/mode/median, and then for some variables of
interest, one has to insert values for which predictions are desired.
I was at a
2010 Jan 10
1
lme4 and function 'cholmod_start' not provided by package 'Matrix' / Ubuntu
Hello all,
Using Ubuntu 9.04 and R 2.8.1.
For a project I need to use the Zelig package, which in turn wants to
use the lme4 package. When trying to use Zelig and it tries to its required
packages I get the following error message.
Error in dyn.load(file, DLLpath = DLLpath, ...) :
function 'cholmod_start' not provided by package 'Matrix'
Error in loadModelDeps(model) :
2011 Oct 18
1
getting basic descriptive stats off multiple imputation data
Hi, all,
I'm running multiple imputation to handle missing data and I'm running into a problem. I can generate the MI data sets in both amelia and the mi package (they look fine), but I can't figure out how to get pooled results. The examples from the mi package, zelig, etc., all seem to go right to something like a regression, though all I want are the mean and SE for all the
2007 Jun 05
1
logit model interpretation
Hello everyone
I appologize for my lack of experience in statistical methods. I am an R
user begginer and I am running a logit model using "zelig" and "pcse"
packages. I will go to the point and is that Im having problems with
interpreting the results of my models.. It is really simple (I guess for the
most advanced scholars) however I really dont understand how to interpret
2009 May 09
1
(no subject)
Could you help me with a problem? I should put non-linear variables into
zelig-model, how can that be done? I'm dealing with air pollution data,
trying to find out daily associations between mortality and air pollutants.
Weather variables used as confounders are in some cases non-linear. Since
smoothing is not an option I don't know how to proceed.
Thanks, Jaana