Nest model results .out file opens in Notepad

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

Nest model results .out file opens in Notepad

Postby rge123 » Wed Mar 16, 2022 12:34 am

Following the example code 'RMark for modeling nest survival data - Mallard nests example,'
the following line of code outputs the models and AICs.
mallard.results # print model-selection table to screen
# model npar AICc DeltaAICc weight Deviance
# 3 S(~NestAge + PpnGrass) 3 1563.010 0.000000 0.464766129 1557.006

For my data, the equivalent code opens a .out file (in Notepad) and doesn't list the models or AIC values.
I've had a look but can't find anyone with this issue, and I think it worked correctly before, but I'm unsure what I've changed.

My code and the .out file are below.
Thank you
Code: Select all
run.nest=function()
{
  # 1. A model of constant daily survival rate (DSR) - Null Model
  S.constant = mark(nest,nocc=135,model="Nest",
                  model.parameters=list(S=list(formula= ~1)), initial.ages = nest$SAge)
  # 2. DSR varies by if backyard does predator control
  S.Contr=mark(nest,nocc=135,model="Nest",model.parameters=list(S=list(formula=~ControlYN)), initial.ages = nest$SAge) #control
  # 3. DSR varies by proportion of vegetation cover from above
  S.Veg=mark(nest,nocc=135,model="Nest",model.parameters=list(S=list(formula=~Robel)), initial.ages = nest$SAge) #robel
  # 4. DSR varies by adult female weight
  S.Weight=mark(nest,nocc=135,model="Nest",model.parameters=list(S=list(formula=~SpWeight)), initial.ages = nest$SAge) # sp weight
  # 5. DSR by bird species native / not to NZ
  S.Nzbird=mark(nest,nocc=135,model="Nest",model.parameters=list(S=list(formula=~Nzbird)), initial.ages = nest$SAge) #nz bird
  # 6. DSR by distance to nearest SEA
  S.SEA=mark(nest,nocc=135,model="Nest",model.parameters=list(S=list(formula=~Hab)), initial.ages = nest$SAge) # hab
  # 7. DSR by nest height from ground
  S.Height=mark(nest,nocc=135,model="Nest",model.parameters=list(S=list(formula=~Nestheight)), initial.ages = nest$SAge) #nest height
  # 8. DSR by branch diameter
  S.Branch=mark(nest,nocc=135,model="Nest",model.parameters=list(S=list(formula=~Branchdiam)), initial.ages = nest$SAge) #branch
  # 9. DSR by nest attributes - branch diam & nest height S.NestAtt=mark(nest,nocc=135,model="Nest",model.parameters=list(S=list(formula=~Branchdiam+Nestheight)), initial.ages = nest$SAge) #branch & nest height
  # 10. DSR by species attributes (Nzbird & weight)
  S.Species=mark(nest,nocc=135,model="Nest",model.parameters=list(S=list(formula=~SpWeight+Nzbird)), initial.ages = nest$SAge) #sp weight & nz bird native y/n
  # 11.   S.Multi=mark(nest,nocc=135,model="Nest",model.parameters=list(S=list(formula=~Branchdiam+Nestheight+Hab)), initial.ages = nest$SAge)
}
nest.results <- run.nest()
nest.results    #opens notepad .out file



# .OUT FILE

Program MARK - Survival Rate Estimation with Capture-Recapture Data
gfortran(dble) Vers. 9.0 Jan 2019 16-Mar-2022 17:13:40 Page 001

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Welcome to MARK rger411 on machine SC-SBS-405107 in subdirectory
"C:\Users\rger411\Dropbox\Documents\Auckland\Nests\RStudio" running file "mark011.inp".
This version was compiled by GCC version 11.2.0 using the options:
-cpp -iprefix c:\tdm-gcc-64\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/11.2.0/
-D_MT -D_REENTRANT -U_REENTRANT -D IEEE -D DBLEPRECISION -m64 -mtune=generic
-march=x86-64 -mthreads -O2 -std=f2018 -fimplicit-none -fbounds-check
-funroll-loops -ftree-vectorize -ffpe-summary=invalid,zero,overflow,underflow
-fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -flto
-fall-intrinsics -fopenmp.

This problem will use 7 of 8 possible threads.


INPUT --- proc title ;

CPU Time for the last procedure was 0.01 seconds.


INPUT --- proc chmatrix occasions= 135 groups= 1 etype= Nest Nodes=
INPUT --- 101 icovar = 3 ICMeans NoHist hist= 112 ;

INPUT --- time interval 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
INPUT --- 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
INPUT --- 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
INPUT --- 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
INPUT --- 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ;

INPUT --- icovariates Branchdiam Nestheight Hab ;

INPUT --- glabel(1)=Group 1;

Number of unique encounter histories read was 112.

Number of individual covariates read was 3.
Time interval lengths are all equal to 1.

Data type number is 24
Data type is Nest Success

CPU Time for the last procedure was 0.01 seconds.

Program MARK - Survival Rate Estimation with Capture-Recapture Data
gfortran(dble) Vers. 9.0 Jan 2019 16-Mar-2022 17:13:40 Page 002
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



INPUT --- proc estimate link=Logit NOLOOP varest=2ndPart ;


INPUT --- model={ S(~Branchdiam + Nestheight + Hab) };

INPUT --- group=1 S rows=1 cols=134 Square ;
INPUT --- 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
INPUT --- 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
INPUT --- 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
INPUT --- 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
INPUT --- 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ;

INPUT --- design matrix constraints=1 covariates=4;
INPUT --- 1 Branchdiam Nestheight Hab;
INPUT --- blabel(1)=S:(Intercept);
INPUT --- blabel(2)=S:Branchdiam;
INPUT --- blabel(3)=S:Nestheight;
INPUT --- blabel(4)=S:Hab;
INPUT --- rlabel(1)=S g1 a1 t1;

Link Function Used is LOGIT

Variance Estimation Procedure Used is 2ndPart
-2logL(saturated) = 0.0000000
Effective Sample Size = 1790

Number of function evaluations was 33 for 4 parameters.
CPU Time for numerical optimization was 0.03 seconds.
-2logL { S(~Branchdiam + Nestheight + Hab) } = 173.27390
Penalty { S(~Branchdiam + Nestheight + Hab) } = 0.0000000
Gradient { S(~Branchdiam + Nestheight + Hab) }:
0.12572046E-04 -0.93939543E-06 0.85722637E-05 0.12838856E-04
Maximum ABS(G) { S(~Branchdiam + Nestheight + Hab) } = 0.1283886E-04
CPU Time to compute VC matrix was 0.01 seconds.
S Vector { S(~Branchdiam + Nestheight + Hab) }:
32.97052 2.016495 0.6959823 0.2954104
CPU Time to invert VC matrix was 0.01 seconds.
Ratio Threshold = 50.000000 Max Gap (1/2) = 16.350407 Next Max Gap (1/2) = 16.350407
Gap Method for Num. of Estimated Parameters { S(~Branchdiam + Nestheight + Hab) } = 4
Threshold { S(~Branchdiam + Nestheight + Hab) } = 0.2567771E-04
Numerical Threshold Method for Num. of Estimated Parameters { S(~Branchdiam + Nestheight + Hab) } = 4
Number of Estimated Parameters { S(~Branchdiam + Nestheight + Hab) } = 4
DEVIANCE { S(~Branchdiam + Nestheight + Hab) } = 173.27390
DEVIANCE Degrees of Freedom { S(~Branchdiam + Nestheight + Hab) } = 108
c-hat { S(~Branchdiam + Nestheight + Hab) } = 1.6043880
AIC { S(~Branchdiam + Nestheight + Hab) } = 181.27390
AICc { S(~Branchdiam + Nestheight + Hab) } = 181.29631
BIC { S(~Branchdiam + Nestheight + Hab) } = 203.23379
Pearson Chisquare { S(~Branchdiam + Nestheight + Hab) } = 435.27918


LOGIT Link Function Parameters of { S(~Branchdiam + Nestheight + Hab) }
95% Confidence Interval
Parameter Beta Standard Error Lower Upper
------------------------- -------------- -------------- -------------- --------------
1:S:(Intercept) 3.8548307 0.4897747 2.8948724 4.8147891
2:S:Branchdiam 0.0023545 0.0014120 -0.4131161E-03 0.0051220

Program MARK - Survival Rate Estimation with Capture-Recapture Data
gfortran(dble) Vers. 9.0 Jan 2019 16-Mar-2022 17:13:41 Page 003
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

3:S:Nestheight 0.1315932 0.1031414 -0.0705639 0.3337503
4:S:Hab -0.1317906 0.0720905 -0.2730880 0.0095068


Real Function Parameters of { S(~Branchdiam + Nestheight + Hab) }

Following estimates based on unstandardized individual covariate values:
Variable Value
--------- -------------
BRANCHDIAM 106.53571
NESTHEIGHT 4.3482143
HAB 2.6148197
95% Confidence Interval
Parameter Estimate Standard Error Lower Upper
-------------------------- -------------- -------------- -------------- --------------
1:S g1 a1 t1 0.9870452 0.0028563 0.9800706 0.9915999


Estimates of Derived Parameters
Survival Estimates of { S(~Branchdiam + Nestheight + Hab) }

Pr. Surviving
Duration of 95% Confidence Interval
Group Study Standard Error Lower Upper
----- -------------- -------------- -------------- --------------
1 0.1742470 0.0675678 0.0775414 0.3462841

CPU Time for the last procedure was 0.05 seconds.

Program MARK - Survival Rate Estimation with Capture-Recapture Data
gfortran(dble) Vers. 9.0 Jan 2019 16-Mar-2022 17:13:41 Page 004
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



INPUT --- proc stop;

CPU Time in minutes for this job was 0.00

Time Start = 17:13:40.969 Time End = 17:13:41.097

Wall Clock Time in minutes for this job was 0.00


E X E C U T I O N S U C C E S S F U L
rge123
 
Posts: 2
Joined: Fri Mar 11, 2022 12:01 am

Re: Nest model results .out file opens in Notepad

Postby jlaake » Fri Mar 18, 2022 11:45 am

You must be using an old version of the mallard nest example that uses collect.models at the end to pool the models into a marklist object. What you have done is create a function that runs a set of models but you haven't pooled them together. R functions return the last value specified which is why you saw the results of the last model that was run and the output is shown in notepad when you specify the name of a model that was run. Please update RMark to make sure you have the latest version of the mallard example and read the documentation. A link is provided for the documentation when you type library(RMark) in R.
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Nest model results .out file opens in Notepad

Postby rge123 » Sat Mar 19, 2022 8:19 pm

Thanks Jeff. I was working from two examples, so I got a bit muddled (stats is not my forte). It works perfectly now.
rge123
 
Posts: 2
Joined: Fri Mar 11, 2022 12:01 am


Return to RMark

Who is online

Users browsing this forum: No registered users and 2 guests