Displaying 20 results from an estimated 22 matches for "depvar".
Did you mean:
depbar
2011 Mar 13
2
Problem implementing 'waldtest' when using 'mlogit' package
...ls.
Specifically, I have run the following command, where mc and mi2 are fitted models:
waldtest(mc,mi2)
I think that the test is taken from the 'lmtest' package. I get the following error message:
Error in terms.default(x) : no terms component
The two fitted models are:
mc <- mlogit(depvar ~ ic + oc, H, reflevel="hp")
mi2 <- mlogit(depvar ~ oc + ic | income, H, reflevel="hp")
I would be grateful for tips on how to proceed. Thanks in advance.
Best regards,
Gaurav S. Ghosh, Ph.D.,
E.ON Energy Research Centre, Room 01.32,
RWTH Aachen,
Mathieustraße 6,
D-52074 A...
2008 Oct 15
1
Forecasting using ARIMAX
Dear R-helpers,
I would appreicate if someone can help me on the transfer parameter in ARIMAX and also see what I am doing is correct.
I am using ARIMAX with 2 Exogeneous Variables and 10 years data are as follows:
DepVar Period, depVar, IndepVar1 Period, indepVar1, IndepVar2 Period, indepVar2
Jan 1998,708,Jan 1998,495,Jan 1998,245.490
Feb 1998,670,Feb 1998,421.25,Feb 1998,288.170
Mar 1998,642.5,Mar 1998,395,Mar 1998,254.950
Apr 1998,610,Apr 1998,377.5,Apr 1998,230.640
:
> (nrowDepVar <- nrow(depVar))
[1] 545...
2011 Dec 07
1
MIXED MODEL WITH REPEATED MEASURES
...nce of statistics, and/or (2) I'm fairly new to R, so
the problem may be related to my ignorance of R syntax. I have tried so many
sources, my head is spinning,
Here is the basic structure of my data (in longitudinal form):
FixedVar1 FixedVar2 RandomVar1 RandomVar2 ...
DepVar
Subject1
1996 AF A 0.002 800 2.1
1997 AF A 0.002 760 2.1
1998 AF A 0.003 760 2.1
1999 AF A 0.005...
2005 Jan 17
2
Omitting constant in ols() from Design
Hi!
I need to run ols regressions with Huber-White sandwich estimators and
the correponding standard errors, without an intercept. What I'm trying
to do is create an ols object and then use the robcov() function, on the
order of:
f <- ols(depvar ~ ind1 + ind2, x=TRUE)
robcov(f)
However, when I go
f <- ols(depvar ~ ind1 + ind2 -1, x=TRUE)
I get the following error:
Error in ols(nareit ~ SnP500 + d3yrtr - 1) :
length of dimnames [2] not equal to array extent
same with +0 instead of -1.
Is there a different way to create an...
2009 Sep 22
4
Evaluating expresssions as parameter values
I need to play games with an expression similar to the following one:
print(xyplot(DepVar ~ Group|Covar, groups=Othergroup,
data=mydf, pch = 18 ,main="Testcase",auto.key = TRUE))
The problem is that the formula argument (the first argument)
an the groups argument are passed over from another program as strings.
The formula argument does not pose problems,
I can do as.form...
2011 Oct 18
1
problem in exceuting PLS
...R-code
Data <- read.csv("C:/TestData.csv")
variable=names(Data)[4:8]
dataset=NULL
dataset$X=NULL
len=length(variable)
for( i in 1:len)
{
var=variable[i]
if(i==1)
{
dataset$X=as.matrix(Data[var])
}
if(i>1)
{
dataset$X=as.matrix(cbind(dataset$X,Data[var]))
}
}
depVar="Y"
dataset$Y=as.matrix(cbind(Data[depVar]))
pls1=mvr(Y~X,data=dataset,ncomp=4)
summary(pls1)
On execution the error is
Error in get(as.character(FUN), mode = "function", envir = envir) :
object 'X6' of mode 'function' was not found
Please help me on this...
2010 Jan 26
6
Help
> Dear All
>
> I have data as follows.
>
> D T M L
> 0.20 1 03 141
> 0.32 1 07 62
> 0.50 1 05 49
> 0.80 1 04 46
> 0.20 2 14 130
> 0.32 2 17 52
> 0.50 2 13 41
> 0.80 2 14 36
> 0.20 3 24 120
> 0.32
2010 Jul 07
0
subscripts for panel.superpose in lattice
...uperpose breaks down because of the subscripts requirement. I
tried to research the documentation and examples, but I cannot figure
out how to make xyplot plug subscripts to a panel... call. Could you
have a look? It would be greatly appreciated.
Thank you,
Laszlo
scatter_contrast <- function(depvar,bins,cutvar,cutvarname = NULL,
yvarlab = NULL,xvarlab =
NULL,nbins=20,maxbins=100,yrange=c(0,99999),plottitle=NULL,legendtitle=NULL)
{
library('lattice')
library('grid')
trellis.par.set(
plot.symbol = list(cex = 1.5,col=rgb(26,71,111,max=255)),
superpose.symbol = list(...
2018 Mar 25
1
Get Specific Records from Another DataFrame
Hello
I have been struggling with this simple looking problem. I have two
dataframes. The first one contains ID, date, and revenue information for
specific suppliers.
id lastdate depvar
A 5/10/2017 10
B 8/16/2017 20
C 2/14/2017 30
D 9/5/2017 40
E 8/1/2017 50
F 11/4/2017 60
G 6/22/2017 70
The second dataframe contains timeseries data of each supplier in different
columns. For example Column A are the transaction dates of supplier A and
A_indvar is an independent variable value for...
2012 Feb 17
2
Error message in gamm. Problem with temporal correlation structure
HELLO ALL,
I AM GETTING AN ERROR MESSAGE WHEN TRYING TO RUN A GAMM MODEL LIKE THE ONE BELOW.
I AM USING R VERSION 2.14.1 (2011-12-22) AND MGCV 1.7-12.
M1 <-gamm(DepVar ~ Treatment + s(Year, by =Treatment), random=list(Block=~1), na.action=na.omit, data = mydata, correlation = corARMA(form =~ Year|Treatment, p = 1, q = 0))
THIS IS THE ERROR MESSAGE
Error in `*tmp*`[[k]] : attempt to select less than one element
I have 312 observations. I get the error when I...
2012 Aug 01
1
optim() for ordered logit model with parallel regression assumption
...nce for any suggestion.
Jun Xu, PhD
Assistant Professor
Department of Sociology
Ball State University
Muncie, IN 47306
####################################################################
library(foreign)
readin <- read.dta("ordfile.dta", convert.factors=FALSE)
myvars <- c("depvar", "x1", "x2", "x3")
mydta <- readin[myvars]
# remove all missings
mydta <- na.omit(mydta)
# theta is the parameter vector
ologit.lf <- function(theta, y, X) {
n <- nrow(X)
k <- ncol(X)
# b is the coefficient vector for independent variables
b...
2012 May 11
0
NLS sensitivity to start= values or poles in data range
...com/RationalFit-0.2.R
# Start of Code
# Read and plot the data
InputData <- read.table("http://itl.nist.gov/div898/strd/nls/data/LINKS/DATA/Hahn1.dat",
header=0,
row.names=NULL,
col.names=c("CTE","K"),
skip=60)
indvar <- 2
depvar <- 1
indvarname <- names(InputData)[indvar]
depvarname <- names(InputData)[depvar]
attach(InputData)
matplot(InputData[indvar],
InputData[depvar],
type='p', pch=4,
xlab = indvarname,
ylab = depvarname,
main = bquot...
2003 Jan 29
3
multinomial conditional logit models
...perschoice <-NULL
for (i in 1:ncat) {
perschoice<-rbind(perschoice,datamat)
}
perschoice<-perschoice[sort.list(perschoice$id),]
perschoice$newy<-gl(ncat,1,length=nrow(perschoice))
dep<-parse(text=paste("perschoice$",substitute(catvar),sep=""))
perschoice$depvar<-as.numeric(eval(dep)==perschoice$newy)
perschoice
}
This works but I wonder if it's the most efficient method. I tried
using "rep" rather than "rbind" in a loop but that replicated the
dataset horizontally, not vertically. Is this the best solution?
I also finally fig...
2007 Aug 09
1
Tukey HSD
Hi,
I was wondering if you could help me:
The following are the first few lines of my data set:
subject group condition depvar
s1 c ver 114.87
s1 c feet 114.87
s1 c body 114.87
s2 c ver 73.54
s2 c feet 64.32
s2 c body 61.39
s3 a ver 114.87
s3 a feet 97.21
s3 a body 103.31 etc.
I entered the following ANOVA command:
>dat <- read.table("mydata.txt", header=T)
>summary(aov(depvar ~ group * condition + Err...
2005 Jun 30
1
Dispersion parameter in Neg Bin GLM
Hi,
Can someone tell me if it is possible to set the dispersion parameter constant when fitting a negative binomial glm in R? I've looked at the documentation and can't find the appropriate argument to pass.
In STATA I can type: nbreg depvar [indepvar...], offset(offset) dispersion(constant).
Thank you
[[alternative HTML version deleted]]
2010 Sep 12
1
R-equivalent Stata command: poisson or quasipoisson?
Hello R-help,
According to a research article that covers the topic I'm analyzing,
in Stata, a Poisson pseudo-maximum-likelihood (PPML) estimation can be
obtained with the command
poisson depvar_ij ln(indepvar1_ij) ln(indepvar2_ij) ...
ln(indepvarN_ij), robust
I looked up Stata help for the command, to understand syntax and such:
www.stata.com/help.cgi?poisson
Which simply says that the command fits a Poisson regression of depvar
on indepvars. However, in my google-searching, I not...
2009 Apr 27
2
Problem with R 2.9.0 vs. R2.8.1 with either "survival" package or "predict" function
Just wanted to alert everyone regarding a problem that I only
experience with R2.9.0 and not with R2.8.1 when I run both using
exactly the same script and the same data.
Here is what I do with my data "MyData", 2 predictors (V1 and V2) and
my survival DV "Depvar":
library(survival)
model<-coxph(Depvar~V1:V2+strata(ID),data=MyData,na.action=na.omit,method="breslow")
When I look at summary(model), the very end of it looks like this in R2.8.1:
Rsquare= 0.067 (max possible= 0.792 )
Likelihood ratio test= 169 on 24 df, p=0
Wald test...
2009 Aug 19
2
Problem with predict.coxph
...ilize the coxph function in the survival library to fit multinomial logit models. (The breslow method produces the same likelihood function as the multinomial logit). We then utilize the predict function to create summary results for various combinations of covariates. For example:
mod1<-coxph(Depvar~Price:Product+strata(ID),data=MyDCMData2,na.action=na.omit,method="breslow")
The model runs fine.
Then we create some new data that is all combinations of Price and Product and retrieve the summary linear predictors.
newdata=expand.grid(Price=factor(as.character(1:5)),Product=factor(as...
2005 Oct 26
0
another ANOVA/LM question
Sorry for posting a possibly stupid question.
I am using aov() for calculating ANOVA as follows:
summary(aov(depVar~factor1*factor2+Error(subject/(factor1+factor2)),
data=anovaAllData))
and usually all works fine.
How exactly the call has to look if I want to use lm() directly to
obtain the same results.
The problem is that due to several reasons I am missing single data
points such that I end up with an u...
2005 Jun 30
1
RE : Dispersion parameter in Neg Bin GLM
...t.org
Objet : [R] Dispersion parameter in Neg Bin GLM
Hi,
Can someone tell me if it is possible to set the dispersion parameter constant when fitting a negative binomial glm in R? I've looked at the documentation and can't find the appropriate argument to pass.
In STATA I can type: nbreg depvar [indepvar...], offset(offset) dispersion(constant).
Thank you
[[alternative HTML version deleted]]
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.or...