Skip to content

Commit

Permalink
incorporated code change from phil to import data better; refactored …
Browse files Browse the repository at this point in the history
…the glmfit to investigate drogue regression--no relationship found in k data
  • Loading branch information
noelweichbrodt committed Nov 22, 2010
1 parent 53e1344 commit 23893e0
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Analysis/drifter_single_var_foo.m
@@ -1,13 +1,11 @@
% arc2007fullname=which('../Data/2007_k_arc.csv');
% arc2007 = importdata(arc2007fullname);
% vars = fieldnames(arc2007);
% for i = 1:length(arc2007)
% assignin('base', vars{i}, arc2007.(vars{i}));
% end
arc2007drogues=arc2007(1:length(arc2007),10);
[droguefit,dev,droguestats]=glmfit(arc2007,arc2007drogues,'poisson');
[platID,obsTime,obsLat,obsLong,sst,ewCurrent,nsCurrent,eLat,eLong,expNum,wmo,drogue] = ...
textread('Data/2007_k_arc.csv', '%d %s %f %f %f %f %f %f %f %d %d %d', 'delimiter', ',', 'headerlines', 15);
%obsTime freaks out the rest of the matrix for some reason???
arc2007 = [platID obsLat obsLong sst ewCurrent nsCurrent eLat eLong expNum wmo drogue];
[droguefit,dev,droguestats]=glmfit(arc2007,drogue,'poisson');
droguestats
droguefit
droguestats.p
%[b,dev,stats] = glmfit(X,y,distr)
% x = [2100 2300 2500 2700 2900 3100 3300 3500 3700 3900 4100 4300]';
% n = [48 42 31 34 31 21 23 23 21 16 17 21]';
Expand Down

0 comments on commit 23893e0

Please sign in to comment.