Displaying 20 results from an estimated 90 matches similar to: "lm( y ~ A/x ) ... how do I extract the coefficients by factor?"
1997 Oct 17
1
R-beta: more model.matrix
I am trying to show some techniques to my graduate regression class.
The textbook mentioned using bootstrap samples of regression
coefficients for assessing variability. I decided to show them
reasonably effective ways of doing the resampling.
The following is a function I wrote to create bootstrap samples of
coefficients from a fitted linear regression model.
bsCoefSample <-
##
2008 Sep 04
1
Timezone support?
This is a follow-up to the thread ending with:
http://rubyforge.org/pipermail/vpim-talk/2008/000120.html
I too am in search of some ruby parser for icalendar which properly handles
timezones on the datetimes in the icalendar RFC.
As I understand it there are actually three types of times.
1) UTC times with a string form of yyyymmddThhmmssZ
note the trailing Z indicates zulu time aka utc.
2)
1997 Oct 28
1
R-beta: Assigning column names in a data frame
You may recall that I was recently constructing a function to
bootstrap the coefficients in a linear regression model. In S-PLUS I
was using the model.matrix function applied to the fitted model, then
taking the QR decomposition of that. I discovered that it was in fact
easier to accomplish the bootstrapping in R because the QR
decomposition of the model matrix is stored with the fitted model.
2005 Dec 22
3
Windows crash in confint() with nls fit (PR#8428)
Full_Name: Ben Bolker
Version: 2.2.1
OS: Windows XP and 2000
Submission from: (NULL) (128.227.60.124)
The following code, using confint() to try
to get confidence intervals on an nls object
that has been fitted with algorithm="port"
reliably crashes R 2.2.0 and 2.2.1 with the
latest version of MASS on a Windows 2000 and
a Windows XP machine here. I *think* earlier
versions of MASS
2008 Jan 08
0
Status of Timezone support / Handeling DTSTART; TZID="(GMT-05.00) Eastern Time (US & Canada)":20080107T123000
I can not tell from the docs or from the mailing list what is the
state of timezone support in the iCalendar package?
If I want to parse an iCalendar file that has non utc dstarts and
dends will it convert those times to UTC or otherwise allow me to do
that?
When I tried to parse an iCalendar input file started off with
something like this:
BEGIN:VCALENDAR
METHOD:REQUEST
2008 Aug 22
0
Question about Timezone In 1.0.2
I''m looking at the docs for 1.0.2 and saw this example...
# Now, you can make timezones like this
cal = Calendar.new
cal.timezone do
timezone_id "America/Chicago"
daylight do
timezone_offset_from "-0600"
timezone_offset_to "-0500"
timezone_name "CDT"
dtstart
2016 Apr 15
0
Decision Tree and Random Forrest
Since you only have 3 predictors, each categorical with a small number of
categories, you can use expand.grid to make a data.frame containing all
possible combinations and give that the predict method for your model to
get all possible predictions.
Something like the following untested code.
newdata <- expand.grid(
Humidity = levels(Humidity), #(High, Medium,Low)
2005 Apr 25
2
residuals in lmer
Does anyone know how to extract residuals in lmer?
Here's the error I get:
>
crop.lme=lmer(response~variety*irrigation*pesticide+(1|rep)+(1|rep:
pesticide)+(1|rep:pesticide:irrigation), crop.data)
> qqnorm(crop.lme)
Error in qqnorm.default(crop.lme) : y is empty or has only NAs
> resid(crop.lme)
NULL
Thanks!
--Jake
2016 Apr 15
1
Decision Tree and Random Forrest
I need the output to have groups and the probability any given record in
that group then has of being in the response class. Just like my email in
the beginning i need the output that looks like if A and if B and if C then
%77 it will be D. The examples you provided are just simply not similar.
They are different and would take interpretation to get what i need.
On Apr 14, 2016 1:26 AM,
2011 Apr 12
0
cross-validation complex model AUC Nagelkerke R squared code
Hi there,
I really tried hard to understand and find my own solution, but now I
think I have to ask for your help.
I already developed some script code for my problem but I doubt that it
is correct.
I have the following problem:
Image you develop a logistic regression model with a binary outcome Y
(0/1) with possible preditors (X1,X2,X3......). The development of the
final model would be
2012 Apr 22
1
Survreg
Hi all,
I am trying to run Weibull PH model in R.
Assume in the data set I have x1 a continuous variable and x2 a
categorical variable with two classes (0= sick and 1= healthy). I fit the
model in the following way.
Test=survreg(Surv(time,cens)~ x1+x2,dist="weibull")
My questions are
1. Is it Weibull PH model or Weibull AFT model?
Call:
survreg(formula = Surv(time, delta) ~ x1
2006 Jun 20
1
GARCH
Dear all R-users,
I have a GARCH related query. Suppose I fit a GARCH(1,1) model on a
dataframe dat
>garch1 = garch(dat)
>summary(garch1)
Call:
garch(x = dat)
Model:
GARCH(1,1)
Residuals:
Min 1Q Median 3Q Max
-4.7278 -0.3240 0.0000 0.3107 12.3981
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
a0 1.212e-04 2.053e-06 59.05 <2e-16 ***
a1
2006 Jun 20
1
GARCH
Dear all R-users,
I have a GARCH related query. Suppose I fit a GARCH(1,1) model on a
dataframe dat
>garch1 = garch(dat)
>summary(garch1)
Call:
garch(x = dat)
Model:
GARCH(1,1)
Residuals:
Min 1Q Median 3Q Max
-4.7278 -0.3240 0.0000 0.3107 12.3981
Coefficient(s):
Estimate Std. Error t value Pr(>|t|)
a0 1.212e-04 2.053e-06 59.05 <2e-16 ***
a1
2009 Aug 28
1
How to generate mean anova value row in anova table, instead of individual value for each predictor
Hi All ,
Can anybody tell me if there's any way to get the summarized anova
values.Now i will explain what i mean , when i say "*summarized*".
Below you can see the anova table of recmeanC1 with rest* all* i.e from
recmeanC2 to i15(predictors),as shown in table.
Df Sum Squares Mean Square F value Significance [Pr(>F)]
recmeanC2 1 89.272 89.272
2011 Jul 13
1
AR-GARCH with additional variable - estimation problem
Dear list members,
I am trying to estimate parameters of the AR(1)-GARCH(1,1) model. I have one
additional dummy variable for the AR(1) part.
First I wanted to do it using garchFit function (everything would be then
estimated in one step) however in the fGarch library I didn't find a way to
include an additional variable.
That would be the formula but, as said, I think it is impossible to add
2024 Mar 14
0
CADFtest difference between max.lag.y with criterion and without criterion
Dear Professor Bernhard,
Sorry for take your time, but I found something strange that I am not able to explain/understand.
Suppose that I compute the ADF test by using the criterion="BIC" to select the lags:
summary(CADFtest(y, max.lag.y = 20, type = "drift", criterion="BIC"))
Suppose that 2 lags are selected.
Next, if I set the lags to 2: summary(CADFtest(y,
2008 Oct 21
2
Question about glm using R
Good morning,
I am using R to try to model the proportion of burned area in Portugal.
The dependent variable is the proportion. The family used is binomial
and the epsilon would be binary.
I am not able to find the package to be used when the proportion (%) has
to be used in glm. Could someone help me?
I am using normal commands of glm.. for example:
glm_5<- glm(formula=p~Precipitation,
1999 Mar 26
0
anova problem:
Hi! I'm running an anova on a lm and I get the message
Error: invalid dimnames given for data frame
Any idea where it comes from?
Many thanks.
Here is the fit and the attempted anova:
> fit
Call:
lm(formula = as.formula(paste(chemical, "a~", cmd, sep = "")), singular.ok = TRUE)
Coefficients:
(Intercept) Odom Displace Weight
2013 Oct 18
0
pamer.fnc y la nueva versión de R
Gracias a todos por las recomendaciones. Ya me he puesto en contacto con el
autor y le explicado donde esta el error. Es tan fácil como que han
cambiado la estructura de los objetos tipos lmer desde la versión 2.15.3
con lo que su paquete dejo de funcionar. Por suerte la nueva estructura
conserva por lo menos la parte necesaria para hacer sus funciones. Se
localizar el fallo y como arreglarlo, lo
2013 Oct 18
2
pamer.fnc y la nueva versión de R
Javier,
Creo que aquí aplica la ley de Linus que dice: "Dado un número
suficientemente elevado de ojos, todos los errores se convierten en
obvios". La persona que revisa y encuentra un error no necesariamente
tiene que ser la misma que la que lo escribe. Una motivación muy importante
al compartir un código es la de recibir los beneficios del control de
calidad por parte de tus pares.