Displaying 20 results from an estimated 88 matches for "indep".
Did you mean:
index
2013 Mar 21
4
easy way of paste
Hello,
Is there a better way to use paste such as:
a = paste(colnames(list.indep)[1],colnames(list.indep)[2],colnames(list.indep)[3],colnames(list.indep)[4],colnames(list.indep)[5],sep="+")
> a
[1] "aa+dummy1+dummy2+bb+cc"
I tried
a = paste(colnames(list.indep)[1:5],sep="+")
> a
[1] "aa" "dummy1"...
2008 May 22
1
How to account for autoregressive terms?
.....+beta5*x5(t)+beta6*y(t-1)+beta7*y(t-2)+beta8*y(t-3)
1) using "lm" :
dates <- as.Date(data.df[,1])
selection<-which(dates>=as.Date("1986-1-1") & dates<=as.Date("2007-12-31"))
dep <- ts(data.df[selection,c("dep")])
indep.ret1 <- ts(data.df[selection,c("RET1")])
indep.ret2 <- ts(data.df[selection,c("RET2")])
indep.ret3 <- ts(data.df[selection,c("RET3")])
indep.ret4 <- ts(data.df[selection,c("RET4")])
indep.ret5 <- ts(data.df[selection,c("...
2012 Sep 29
1
Unexpected behavior with weights in binomial glm()
...e to aggregate up my data frame and run glm(...,
family="binomial",weights=wts) and get the same coefficients (maybe
this is my incorrect assumption, but I can't see why it would be).
Anyways, here's a minimum working example below:
> d = data.frame( RESP=c(rep(1,5),rep(0,5)), INDEP=c(1,1,1,1,0,0,0,0,0,0) )
> glm( RESP ~ INDEP, family="binomial", data=d )
Call: glm(formula = RESP ~ INDEP, family = "binomial", data = d)
Coefficients:
(Intercept) INDEP
-1.609 21.176
Degrees of Freedom: 9 Total (i.e. Null); 8 Residual
Null Deviance:...
2005 Jun 17
0
another aov results interpretation question
...9;t already.)
hope this helps.
spencer graves
RenE J.V. Bertin wrote:
> Hello,
>
> I'm trying to understand how to interpret the differences in results between two versions of a 2-factor ANOVA with (slightly?) different models, of an observable y, a within-subject factor 'indep' and a grouping factor 'cond' (and a subject 'factor' Snr):
>
>
>>summary( aov( y~cond + indep + Error(Snr/indep) ) )
>
> # example results:
> Error: Snr
> Df Sum Sq Mean Sq F value Pr(>F)
> cond 1 103.1 103.1 1.425 0.248
&g...
2012 Jan 15
1
Need help interpreting the logit regression function
...is not so, please suggest
another function that can be used (and no need to read further).
But if this is usable, then the numbers are not making sense for me.
What I am seeing is best explained through an example:
#Setting up the data:
>c(1,1,0,0,1,1,0,1,1,0,0,0,0,1,1,0,0,0,0,1)->resp
>indep<-rep(2:3,10)
#Running the logistic regression:
>glm(formula = resp~as.factor(indep) , family = binomial(link = "logit"),na.action = na.pass)
#Gives me:
Coefficients:
(Intercept) as.factor(indep)3
-1.692e-16 -4.055e-01
>table(indep,resp)
resp
indep 0 1...
2009 Feb 03
1
How to show variables used in lm function call?
...llowing issue: I wrote a function to build ts models using
different inputs, but when R displays the call for a model, I cannot tell
which variables
it is using because it shows the arguments instead of the real variables
passed to the function.
(e.g
Call:
lm(formula = dyn(dep ~ lag(dep, -1) + indep)) ---> not what I want to see
lm(formula = dyn(Y ~ lag(Y, -1) + XVARY)) -----> this is what I want to
see
(see simplified version of the code and output below)
Thanks in advance for any help!!
options (scipen=999, digits=7)
library(Hmisc)
library(DAAG)
library(car)
library(MASS)
l...
2010 Mar 16
3
function arguments: name of an object vs. call producing the object?
...only* if a glm object was passed as an argument, not a call to
glm() producing that object.
How can I distinguish these two cases?
For example, I can use the following to get the name of the argument:
foo.glm <- function(object) {
oname <- as.character(sys.call())[2]
oname
}
> indep <- glm(Freq ~ mental + ses, family = poisson, data = Mental)
> foo.glm(indep)
[1] "indep"
But in foo.glm() I want to avoid using this as oname:
> foo.glm(glm(formula = Freq ~ mental + ses, family = poisson, data =
Mental))
[1] "glm(formula = Freq ~ mental + ses, family =...
2009 Jun 21
2
Help on qpcR package
I am using R on a Windows XP professional platform.
The following code is part of a bigger one
CODE
press=function(y,x){
library(qpcR)
models.press=numeric(0)
cat("\n")
dep=y
print(dep)
indep=log(x)
print(indep)
yfit=dep-PRESS(lm(dep~indep))[[2]]
cat("\n yfit\n")
print(yfit)
yfit.orig=yfit
presid=y-yfit.orig
press=sum(presid^2)
cat("\n")
cat("PRESS =",press,"\n")
}
On the command R window I define
- Ignored:
>...
2013 Mar 22
0
predict.Arima error "'xreg' and 'newxreg' have different numbers of columns"
Hello all,
I use arima to fit the model with
fit <- arima(y, order = c(1,0,1), xreg = list.indep, include.mean = TRUE)
and would like to use predict() to forecast:
chn.forecast <- rep(0,times=num.record)
chn.forecast[1] <- y[1]
for (j in 2:num.record){
indep <- c(aa=chn.forecast[j-1], list.indep[j,2:num.indep]) # this is the newxreg in the fo...
2002 Mar 15
1
calibration/inverse regression?
I wonder if anyone out there has written a routine to solve the simple
linear calibration problem?
- fit regression of y vs x
- estimate the value x0 (with 95% CI) that gives y0
Thanks for any help.
Bill
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info",
2005 Mar 30
2
Step error
Could anyone tell me what am I doing wrong?
> pro<-function(indep,dep){
+ d<-data.frame(indep)
+ form<-formula(lm(dep~.,data=d))
+
forward<-step(lm(dep~X1,data=d),scope=form,trace=0,direction='f')
+ return(forward)
+ }
> pro(m,q)
Error in inherits(x, "data.frame") : Object "d" not
found
Where q is a vector with the de...
2010 Mar 11
0
Different results for different order of factor levels?
...E USED TO GET THE COEFFICIENTS:
#Abbr = Subject
#PDSI = covariate
#PDSI2 = PDSI^2 (To fit a polynomial)
#Set the Level order
i.levels<-c("Mixed","Short","Tall","NoType")
#I am not interested in this level for my comparison
data.sub <- data[which(data$indep != "NoType"),]
#Convert the data into factors
data$indep<-factor(data$indep,
levels = i.levels)
#Run the model
F <- lme(response~indep+PDSI+PDSI2+indep:PDSI+indep:PDSI2,
random = ~PDSI|Abbr, data = data.sub, method = "ML")
#Get the coefficients for the fixed effects
s...
2009 Feb 07
3
Output results to a single postscript document
...foreign)
library(Hmisc)
library(prettyR)
library(DAAG)
library(lmtest)
library(car)
library(MASS)
library(nlme)
library(dyn)
library(wle)
library(lasso2)
library(zoo)
tdata <- ts(read.table("C:/tmp/data.csv" ,sep = ",",header=TRUE))
print(tdata)
res <- function(dep, indep, fn, env = parent.frame()) {
depnm <- deparse(substitute(dep))
indepnm <- deparse(substitute(indep))
fo <- sprintf("%s ~ lag(%s, -1) + %s", depnm, depnm, indepnm)
fo <- as.formula(fo, env = env)
mod <- do.call(dyn$lm, list(fo))
su...
2008 Sep 03
1
test if all predictors in a glm object are factors
...uot;glm")) stop("requires a glm object")
if (!is.discrete.glm(model)) stop("only factors are allowed")
...
}
A small example, for count data, a poisson glm:
GSS <- data.frame(
expand.grid(sex=c("female", "male"), party=c("dem", "indep", "rep")),
count=c(279,165,73,47,225,191))
mod.glm <- glm(count ~ sex + party, family = poisson, data = GSS)
So, the model terms are sex and party, both factors. Peeking inside
mod.glm, I
can find
> mod.glm$xlevels
$sex
[1] "female" "male"
$party
[...
2008 Apr 09
0
energy 1.1-0 with dcov
...nergy 1.1-0, is now available on
CRAN.
This version has merged the dcov package (previously available from my
personal web page) into energy.
New functions include:
dcov (distance covariance)
dcor (distance correlation)
DCOR (four statistics)
dcov.test (distance covariance test of multivariate independence)
indep.test (choice of nonparametric energy tests of multivariate independence)
These functions implement the new methods introduced in our recent article:
G. J. Szekely, M. L. Rizzo and N. K. Bakirov (2007) Measuring and Testing
Independence by Correlation of Distances, Annals of Statist...
2008 Apr 09
0
energy 1.1-0 with dcov
...nergy 1.1-0, is now available on
CRAN.
This version has merged the dcov package (previously available from my
personal web page) into energy.
New functions include:
dcov (distance covariance)
dcor (distance correlation)
DCOR (four statistics)
dcov.test (distance covariance test of multivariate independence)
indep.test (choice of nonparametric energy tests of multivariate independence)
These functions implement the new methods introduced in our recent article:
G. J. Szekely, M. L. Rizzo and N. K. Bakirov (2007) Measuring and Testing
Independence by Correlation of Distances, Annals of Statist...
2004 Oct 07
5
'with' usage question
...t; > attach(data) ; aov.SS1(y=Obs) ; detach(data)
>
> Or is that just wishful thinking??
The latter.
On Thu, 7 Oct 2004, RenE J.V. Bertin wrote:
> Hello,
>
> I'm having a little argument with the 'with' function. I have
>
>
> aov.SS1 <- function( y, indep=speed, fSnr=Subject, ... )
> {
> indep <- factor(speed)
> fSnr <- factor(fSnr)
> ## ....
> }
>
> and a dataframe containing speed, Subject, and a bunch of other columns. If I now do
>
> > with( data, aov.SS1( y=Obs ) )
>
> I get a message
>
>...
2009 Nov 04
1
variable selectin---reduce the numbers of initial variable
hello,
my problem is like this: now after processing the varibles, the remaining
160 varibles(independent) and a dependent y. when I used PLS method, with 10
components, the good r2 can be obtained. but I donot know how can I express
my equation with the less varibles and the y. It is better to use less
indepent varibles. that is how can I select my indepent varibles. Maybe
GA is good method,...
2000 Mar 31
1
R: one bananna aov() question
Hello world,
I'm trying to do an
anova on data in data.set, dependent variable is a column
named "dep.var", grouping variable is in a column called "indep.var", and
is.factor(indep.var) is TRUE...
why can't I just do aov(dep.var ~ indep.var, data = data.set)?
What have I done to deserve this?! What gives? Am I missing something
totlly obvious?
R-base-1.0.0-1, linux RH 6.1.
--------------------------------------------------------------...
2011 Jul 06
2
wgcna
...data from two (or more) microarray data sets"), which use wgcna package. I have an error in the function modulePreservation (it is below).
I'm using R2.13
Can you help me? Do you know, what is happens?
Thanks
Raquel
multiExpr = list(A = list(data=t(badea)),B = list(data=t(mayo)))
# two independent datasets (dim = 13447 x 36)
mp = modulePreservation(multiExpr,multiColor,referenceNetworks=1,verbose=3,networkType="signed",nPermutations=2,maxGoldModuleSize=100,maxModuleSize=400)
..checking data for excessive amounts of missing data..
Flagging genes and samples with too m...