similar to: Command Prompt Question

Displaying 20 results from an estimated 4000 matches similar to: "Command Prompt Question"

2003 Oct 09
2
R-1.8.0 on Sparc Solaris 8, gcc3.2.1, bus error and core dump (PR#4485)
Example run and stack trace: wazor /s/src/stat/R-1.8.0/tests/Examples $ ../../bin/R --no-save < base-Ex.R R : Copyright 2003, The R Development Core Team Version 1.8.0 (2003-10-08) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a
2004 Jul 16
0
Does AIC() applied to a nls() object use the correctnumber of estimated parameters?
Thanks Adaikalavan, however the problem remains. Considering AIC() as applied to the linear model in AIC() help documentation: > data(swiss) > lm1 <- lm(Fertility ~ . , data = swiss) > AIC(lm1) [1] 326.0716 Clearly this includes the estimation of the residual standard error as an estimated parameter, as this gives the correct score: > -2*logLik(lm1) + 2*(length(coef(lm1))+1)
2004 Aug 10
0
Check failed after compilation (PR#7159)
Full_Name: Madeleine Yeh Version: 1.9.1 OS: AIX 5.2 Submission from: (NULL) (151.121.225.1) After compiling R-1.9.1 on AIX 5.2 using the IBM cc compiler, I ran the checks. One of them failed. Here is the output from running the check solo. root@svweb:/fsapps/test/build/R/1.9.1/R-1.9.1/tests/Examples: ># ../../bin/R --vanilla < stats-Ex.R R : Copyright 2004, The R
2008 Feb 28
0
use of step.gam (from package 'gam') and superassignment inside functions
Hello, I am using the function step.gam() from the 'gam' package (header info from library(help=gam) included below) and have come across some behavior that I cannot understand. In short, I have written a function that 1) creates a dataframe, 2) calls gam() to create a gam object, then 3) calls step.gam() to run stepwise selection on the output from gam(). When I do this, gam()
2006 May 06
2
How to test for significance of random effects?
Dear list members, I'm interested in showing that within-group statistical dependence is negligible, so I can use ordinary linear models without including random effects. However, I can find no mention of testing a model with vs. without random effects in either Venable & Ripley (2002) or Pinheiro and Bates (2000). Our in-house statisticians are not familiar with this, either,
2010 Aug 17
2
how to selection model by BIC
Hi All: the package "MuMIn" can be used to select the model based on AIC or AICc. The code is as follows: data(Cement) lm1 <- lm(y ~ ., data = Cement) dd <- dredge(lm1,rank="AIC") print(dd) If I want to select the model by BIC, what code do I need to use? And when to select the best model based on AIC, what the differences between the function "dredge" in
2013 Mar 18
1
try/tryCatch
Hi All, I have tried every fix on my try or tryCatch that I have found on the internet, but so far have not been able to get my R code to continue with the "for loop" after the lmer model results in an error. Here is two attemps of my code, the input is a 3D array file, but really any function would do.... metatrialstry<-function(mydata){ a<-matrix(data=NA, nrow=dim(mydata)[3],
2010 Oct 12
1
delta AIC for models with 2 variables using MuMIn
Dear List, I want to ask a AIC question based on package library(MuMIn) The relative importance of 16 explanatory variables are assessed using delta AIC in a generalized linear model. Please kindly advise if it is possible to show models with any two only certain variables. Thank you. Elaine I asked a similar question and got a great help for models with only one variable as below.
2003 Jul 30
2
Comparing two regression slopes
Hello, I've written a simple (although probably overly roundabout) function to test whether two regression slope coefficients from two linear models on independent data sets are significantly different. I'm a bit concerned, because when I test it on simulated data with different sample sizes and variances, the function seems to be extremely sensitive both of these. I am wondering if
2011 Jul 13
3
Sum weights of independent variables across models (AIC)
Hello, I'd like to sum the weights of each independent variable across linear models that have been evaluated using AIC. For example: > library(MuMIn) > data(Cement) > lm1 <- lm(y ~ ., data = Cement) > dd <- dredge(lm1, beta = TRUE, eval = TRUE, rank = "AICc") > get.models(dd, subset = delta <4) There are 5 models with a Delta AIC Score of
2005 Mar 09
1
multiple comparisons for lme using multcomp
Dear R-help list, I would like to perform multiple comparisons for lme. Can you report to me if my way to is correct or not? Please, note that I am not nor a statistician nor a mathematician, so, some understandings are sometimes quite hard for me. According to the previous helps on the topic in R-help list May 2003 (please, see Torsten Hothorn advices) and books such as Venables &
2006 Nov 30
1
data.frame within a function (PR#9294) (cont'd)
This continues the message "data.frame within a function (PR#9294)" that was posted on 2006/10/12. Duncan Murdoch kindly replied. I'm using the current version R 2.4.0, but the same issue exists. Just copy and paste the following code under R, and compare the output of f1() and f2() and the output of f3() and f4(). Does anybody have any idea? Thanks.
2008 Oct 17
1
find bayesian information criterion for all variable combinations
Hi, I have data for one dependent variable and multiple independent variables y = b0 + b1*x1 + b2*x2 + ... I want to a list of all models that have some subset of the independents (just x1 x2, and not x3, etc.) and their corresponding BIC values. Is there a pre-existing function that does this? I saw that you can calculate individual BIC values using 'lm' and something like AIC(lm1, k
2012 Jan 21
1
Function for multiple t tests
Hi, I want to run t.test() for several variables among two groups, and I would like to skip the tedious process of collecting information to assemble a table, but I am not sure if the function I want already exists. Any suggestion would be appreciated. I have a working example, as required by the posting guide: my_swiss = swiss[-1,] my_swiss$facto = rep(1:2,nrow(my_swiss)/2)
2012 May 22
1
Adding Text to a Plot
Hi, all! I'm pretty sure I'm missing something about this. Is there a smart way of typping hat(R)^2 and it's value from a linear regression? I've just found this tricky one: # Sample data x <- sample(1:100,10) y <- 2+3*x+rnorm(10) # Run the regression lm1 <- lm(y~x) # Plotting plot(x,y, main="Linear Regression", col="red")
2005 May 31
2
simple predict question
Excuse the simple question... I'm not sure what I'm doing wrong with predict, but let me use this example: Suppose I do: dat<-matrix(c(0,0,10,20),2,byrow=T) lm1<-lm(dat[,2]~dat[,1]) Suppose I want to generate the linearly-interpolated y-values between the point (0,0) and (0,20) at every unit interval. I thought I just do: predict(lm1, data.frame(seq(0,10,1))) to get
2013 Jan 18
1
Object created within a function disappears after the function is run
Dear R-helpers, I have run the code below which I expected to make an object called dd1, but that object does not exist. So, in summary, my problem is that my function is meant to make an object (dd1), and it does indeed make that object (I know that the last line of the function prints it out) but then, after the function has run, the object has disappeared. It's late on a Friday so I may
2010 Jun 17
1
Problems using allEffects() (package effect)
Dear R users, I have some trouble using the allEffects() function to compute and display effect plots for a linear model. My data is quite simple, it concerns effects of 3 treatments on the tumoral volume of mice. vTum codes for the qualitative initial volume, from small to big, temps is the time in month since beginning of treatment, and S?rie codes for the batch. Data is unbalanced. >
2011 Apr 04
1
multiple variables Y and X
Hello I have a model with several hundred Y variables, and also several 1000 X variables. The model is linear lm(Y ~ X). My questions are: 1.- how to avoid writing all Xs variables? is list() the right function? 2.- about the multiple Ys with dependence among some of them, how to incorporate that information in the linear model? Thank you Rosario
2010 Apr 08
2
Overfitting/Calibration plots (Statistics question)
This isn't a question about R, but I'm hoping someone will be willing to help. I've been looking at calibration plots in multiple regression (plotting observed response Y on the vertical axis versus predicted response [Y hat] on the horizontal axis). According to Frank Harrell's "Regression Modeling Strategies" book (pp. 61-63), when making such a plot on new data