Displaying 20 results from an estimated 100 matches similar to: "[Solved][Code Snippets] Dropping Empty Regressors"
2010 Jan 26
0
Trouble Highlighting outliers on Time Series Plot
I am having trouble plotting outliers on time series.
Give then following code:
############################################################
# find STL Outliers by weight and append sh2, use Robust
# this should allow the initial outliers to be filtered
# this section may be commented out.
############################################################
tsSourceDiag <-
2009 Dec 03
0
Problem with predict() and factors
I am working on a script that takes numeric performance indicators and runs
them against a series of regressors (dummy regressors, yes\no stuff via 0
and 1, e.g. Was is Christmas this week 0=no, 1=yes).
The script is as follows (Written as a function):
-- Begin Script --
doEnv <- function(HOUR,ENVNAME,REPORTNAME) {
library(RODBC)
library(forecast)
library("geneplotter")
2009 Jul 15
2
storing lm() results and other objects in a list
to clean up some code I would like to make a list of arbitrary length
to store?various objects for use in a loop
sample code:
############ BEGIN SAMPLE ##############
# You can see the need for a loop already
linearModel1=lm(modelSource ~ .,mcReg)
linearModel2=step(linearModel1)
linearModel3=lm(modelSource ~ .-1,mcReg)
linearModel4=step(linearModel3)
#custom
linearModel5=lm(modelSource ~ .
2003 Oct 28
1
error message in simulation
Dear R-users,
I am a dentist (so forgive me if my question looks stupid) and came across
a problem when I did simulations to compare a few single level and two
level regressions.
The simulations were interrupted and an error message came out like 'Error
in MEestimate(lmeSt, grps) : Singularity in backsolve at level 0, block 1'.
My collegue suggested that this might be due to my codes
2011 Jan 21
1
Help for lattice. par(new=TRUE)
Hi list,
I want to plot two plot in the same figure. I set par(new=TRUE). But
it does not work.
library(lattice)
myPanel <- function(x,...)
{
panel.histogram(x,alpha=0.4,...)
ltext(0.4,1.5,paste("Mean=","0.05",digit=2)),cex=0.8)
ltext(0.8,1.5,paste("s.d.=","0.06",digit=2)),cex=0.8)
}
histogram(sh2,
2010 Jan 07
1
Drop a part of an array\list\vector?
I did have a verbose description of why but rather then make everyone's eyes
bleed with useless details I ask the following :)
To make a long story short: How can I make newmcReg[[i]]["PreIO308"] go
away in the following list... er vector... no wait array.... dataframe....
awww crap...
summary(newmcReg[[i]])
UNITBUILD UNITDB ITBUILD ITDB
Mode :logical
2004 Jun 26
1
openssh debian bug?
I spent the last couple of hours trying to figure this out. We upgraded
to sshd version OpenSSH_3.8.1p1 Debian and now "password" login no longer
works... however keyboard-interactive login still works. the result of
this is that while openSSH clients still function, ssh applications like
MindTerm do not.
here is the debug dump from the login session:
Jun 25 21:47:50 m1
2010 Jun 30
1
PAM Module:Openssh and Tacacs+ Question
Hi,
I am trying to get Openssh 5.5p1 to work with TACACS+. I have the TACACS
+ PAM module compiled on Ubuntu. I have compiled SSH --with-pam.
When the user is defined in /etc/passwd, the SSH authentication to the
TACACS+ server takes place successfully.
If I REMOVE the user from /etc/passwd OpenSSH sends a string called
INCORRECT to the TACACS+ server and it denies authentication.
I am trying
2009 Jul 14
2
Proper Paste for Data Member
I imported a spreadsheet into a variable sh
e.g. sh$aaaa, sh$bbbb, etc...
doing the following:
tsSource <- ts(paste("sh$",NAMEVARIABLE,sep="") ... )
fails. The paste isn't evaluating properly. What is the proper way to
concatenate a data source with a member name such that they evaluate
properly.
actual code below:
doEnv <-
2010 Jan 11
1
Getting a date out of an indice in a time series
I have a weekly data set imported via:
tsSource=ts(sh1$I000,start=c(2004,1),freq=52)
I am now getting to some 'spit and polish' but I realize something I can't
wrap my head around.
Given an outlier I find at say tsSource[54] ... how can get translate index
54 into the date\week. I mean I can figure out obviously that entry 52 is
last week of 2004 but since the data goes for many
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
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,
2008 Jul 31
0
random effects mixed model, different regressors
Hi everybody,
I have 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
2009 Mar 23
0
Scaled MPSE as a test for regressors?
Hi,
This is really more a stats question than a R one, but....
Does anyone have any familiarity with using the mean prediction
squared error scaled by the variance of the response, as a 'scale
free' criterion for evaluating different regression algorithms.
E.g.
Generate X_train, Y_train, X_test, Y_test from true f. X_test/Y_test
are generated without noise, maybe?
Use X_train, Y_train
2017 May 16
0
Wish for arima function: add a data argument and a formula-type for regressors
Hi,
Using arima on data that are in a data frame, especially when adding
xreg, would be much easier if the arima function contained
1) a "data=" argument
2) the possibility to include the covariate(s) in a formula style.
Ideally the call could be something like
> arima(symptome, order=c(1,0,0), xreg=~trait01*mesure0, data=anxiete)
( or arima(symptome~trait01*mesure0,
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
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:
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 different number of rows per
individual.
For each
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
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)