Displaying 20 results from an estimated 288 matches for "regressor".
Did you mean:
regressors
2010 Feb 09
2
Model matrix using dummy regressors or deviation regressors
The model matrix for the code at the end the email is shown below.
Since the model matrix doesn't have -1, I think that it is made of
dummy regressors rather than deviation regressors. I'm wondering how
to make a model matrix using deviation regressors. Could somebody let
me know?
> model.matrix(aaov)
(Intercept) A2 B2 B3 A2:B2 A2:B3
1 1 0 0 0 0 0
2 1 0 0 0 0 0
3 1 0 0 0 0...
2010 Jan 12
0
[Solved][Code Snippets] Dropping Empty Regressors
To make a long story short I was doing some in-sample testing in which some
dynamically created regressors would end up either all true or all false
based on the validation portion. In my case a new mainframe configuration
(this is a crappy way to handle a level shift but I do what I can.) So here
is the code snippet that finally let me pre-check my regressors and drop any
of them that were all true or...
2017 Dec 04
3
problem with the behaviour of dashed lines in R plots
dear R users,
I am performing a linear regression with lm, and I would like to plot
the regressor in dashed lines. I know that the lty=2 option is the way
out, but it has a very strange behaviour: the line starts dashed but
then the spaces between each dash becomes very tiny and so the line
become somehow continuous for the human eye. Do you know how to fix that
problem, in order to have a...
2009 Jul 15
2
Spaces in a name
I am reading regressors from an excel file (I have no control over the file)
and some of the element names have spaces:
i.e. "Small Bank Aquired"
but I have found that lm(SourceData ~ . - "Small Bank Aquired", mcReg)
doesn't work (mcReg = modelCurrentRegressors)
As they are toggles I have ran t...
2012 Aug 23
1
All possible models with nls()
...explanatory var
y<-sample(0:1,50,replace=T)#response
# first script I've tried
mod <- list()
for (i in 1:3) {
mod[[i]] <- nls(y~exp(c+(a1*x1)+(a2*x2)
)/
(1+exp(c+(a1*x1)+(a2*x2)))
,start=list(a1=-0.2,a2=-0.2,c=0.2))
print(summary(mod[[i]]))
}
#second script I've tried
regressors<-c("x1","x2")
regMat<-expand.grid(c(T,F),c(T,F))
regMat
allModelsList <- apply(regMat,1,
function(x)as.formula(nls(y~exp(c+(a1*x1)+(a2*x2)
)/
(1+exp(c+(a1*x1)+(a2*x2)))
,start=list(a1=-0.2,a2=-0.2,c=0.2))))
allModelsList
allModelsResults <- lapply(allModelsList,...
2012 Nov 14
0
Time Series with External Regressors in R Problems with XReg
Hello everyone,
Hope you all are doing great! I have been fitting arima models and
performing forecasts pretty straightforwardly in R.
However, I wanted to add a couple of regressors to the arima model to see if
it could improve the accuracy of the forecasts but have had a hard time
trying to do so.
I used the following R function:
arima(x, order = c(0, 0, 0),
seasonal = list(order = c(0, 0, 0), period = NA),
xreg = NULL, include.mean = TRUE,
transform.pars = TRUE,
fixed = N...
2009 Feb 12
2
beginner's question: group of regressors by name vector?
dear r-experts: there is probably a very easy way to do it, but it eludes
me right now. I have a large data frame with, say, 26 columns named "a"
through "z". I would like to define "sets of regressors" from this data
frame. something like
myregressors=c("b", "j", "x")
lm( l ~ myregressors, data=... )
is the best way to create new data frames that contain all the variables I
want, then use ".", and then destroy them again? or am I overlooking...
2008 May 28
1
Fixing the coefficient of a regressor in formula
...last coefficient to be NA,
which makes sense given the perfect collinearity.
without getting in lengthy details about my code, let me just say that
to avoid the colinearity problem,. I do not want to omit G1 from the
regression. Instead, I want to fix the regression coefficient of one of
the regressors, G1, to 1.
I have read the R manual section on formulae but I have not found how to
do fix a regression coefficient. Conceptually speaking it seems to me
that it should be simple, and I am sure that someone explained it
somewhere, but I did not find the proper keywords to find it!
So, does so...
2024 Apr 23
1
System GMM yields identical results for any weighting matrix
A copy of this question can be found on Cross Validated:
https://stats.stackexchange.com/questions/645362
I am estimating a system of seemingly unrelated regressions (SUR) in R.
Each of the equations has one unique regressor and one common regressor. I
am using `gmm::sysGmm` and am experimenting with different weighting
matrices. I get the same results (point estimates, standard errors and
anything else that I can see (**except** for the value of the $J$-test)
regardless of the weighting matrix. I do not think this is...
2003 Aug 27
1
Problem in step() and stepAIC() when a name of a regressors has b (PR#3991)
Hi all,
I've experienced this problem using step() and stepAIC() when a name of a
regressors has blanks in between (R:R1.7.0, os: w2ksp4).
Please look at the following code:
"x" <-
c(14.122739306734, 14.4831100207131, 14.5556459667089,
14.5777151911177,
14.5285815352327, 14.0217803203846, 14.0732571632964,
14.7801310180502,
14.7839362960477, 14.7862217992577)
&...
2024 Apr 23
0
System GMM fails due to computationally singular system. Why?
A copy of this question can be found on Cross Validated:
https://stats.stackexchange.com/questions/645610
I am estimating a system of seemingly unrelated regressions (SUR) with
`gmm::sysGmm` in R. Each of the equations has one unique regressor and one
common regressor. The common regressor is a dummy variable indicating the
last observation (n-1 zeros followed by 1). I impose a restriction that the
coefficients on the common regressor are equal across equations. See a
reproducible example below.
The fitting routine yields the following...
2024 Apr 23
1
System GMM yields identical results for any weighting matrix
...M Richard Hardy <brukalinis at gmail.com> wrote:
>
> A copy of this question can be found on Cross Validated:
> https://stats.stackexchange.com/questions/645362
>
> I am estimating a system of seemingly unrelated regressions (SUR) in R.
> Each of the equations has one unique regressor and one common regressor. I
> am using `gmm::sysGmm` and am experimenting with different weighting
> matrices. I get the same results (point estimates, standard errors and
> anything else that I can see (**except** for the value of the $J$-test)
> regardless of the weighting matrix. I d...
2013 May 02
2
ARMA with other regressor variables
Hi,
I want to fit the following model to my data:
Y_t= a+bY_(t-1)+cY_(t-2) + Z_t +Z_(t-1) + Z_(t-2) + X_t + M_t
i.e. it is an ARMA(2,2) with some additional regressors X and M.
[Z_t's are the white noise variables]
How do I find the estimates of the coefficients in R?
And also I would like to know what technique R employs to find the
estimates?
Any help is appreciated.
Thanks,
Preetam
--
Preetam Pal
(+91)-9432212774
M-Stat 2nd Year,...
2017 May 16
0
Wish for arima function: add a data argument and a formula-type for regressors
...lyses
consist often in a the interaction effect of treatment and usual
training effect, with typically arma type of error, resulting in the
above model. Typically, all the needed data are in a data.frame .
An additional advantage concerns the names of the coefficient in the
output: if only one regressor:
>arima(anxiete$symptome, order=c(1,0,0), xreg=anxiete[, c("trait01")]) [...]
Coefficients:
ar1 intercept anxiete[, c("trait01")]
0.5649 33.8623 -8.1225
s.e. 0.1073 0.5969 0.8052
but the name convention changes w...
2003 Sep 01
1
Arima with an external regressor
Hello,
Does anybody know if the function arima with an external regressor (xreg)
applies the auto correlation on the dependant variable or on the residuals.
In comparison with SAS (proc autoreg), it seems that the auto correlation
applies on the residuals but i'd like to have the confirmation.
I want to estimate:
Y[t] = a[1]*X[t] + a[2] + E[t]
with E[t]=b[1]*E[t-1]...
2005 May 19
1
logistic regression: differential importance of regressors
Hi, All. I have a logistic regression model that I have run. The
question came up: which of these regressors is more important than
another?
(I'm using Design)
Logistic Regression Model
lrm(formula = iconicgesture ~ ST + SSP + magnitude + Condition +
Expertise, data = d)
Coef S.E. Wald Z P
Intercept -3.2688 0.2854 -11.45 0.0000
ST 2.0871 0.2730 7.64 0.0000
SSP...
2005 Sep 06
0
MASS: rlm, MM and errors in observations AND regressors
Hello,
I need to perform a robust regression on data which contains errors in BOTH
observations and regressors. Right now I am using rlm from the MASS package
with 'method="MM"' and get visually very nice results. MASS is quite clear,
however, that the described methodologies are only applicable to
observation-error only data (p. 157, 4th Ed.). So here's the questions now:
a) is ther...
2008 Jul 31
0
random effects mixed model, different regressors
...e built a model that includes subject ID as a random effect, and has a
continous variable (time) and I want to test whether the slope of this line
differs between treatments (this is tested with the interaction between
treatment and "time").
My question now is that I also want to include regressors that might explain
variation in this slope between subjects (and of which I have this one
estimate for the whole time period). How do I do this? If I just code it as
the same number for all the time points I have measured I am overestimating
my sample size don't I? (because I have not measured...
2010 Dec 16
1
predict.lm with new regressor names
...0)
lm.yx<-lm(y~x1)
To predict from a new data source, one can use:
# works as expected
dum<-data.frame(x1=rnorm(200))
predict(lm.yx, newdata=dum)
Suppose lm.yx has been run and we have the lm object. And we have a
dataframe that has columns that don't correspond by name to the
original regressors. I very! naively assumed that doing this (below)
would work. It does not.
# does not work
lm.yx$coefficients<-c("Intercept", "n.x1")
dum2<-data.frame(Int=rep(1,200), n.x1=rnorm(200))
predict(lm.yx, newdata=dum2)
I know that a simple alternative is to do:
# because we m...
2007 May 05
1
dynamically specifying regressors/RHS variables in a regression
Does anyone know if there is a way to specify regressors dynamically
rather than explicitly?
More specifically, I have a data set in "long format" that details a
number of individuals and their responses to a question (which can be
positive, negative, or no answer). Each individual answers as many
questions as they want, so there are a diffe...